mirror of
https://github.com/modrinth/code.git
synced 2026-08-26 17:44:50 +00:00
Window occlusion checks on MacOS (#6135)
* wip: window occlusion checks on MacOS * wip: occlusion works * occlusion notification * fix ci * fix * wire in hiding into macos occlusion * remove debug logs * fix * clean up
This commit is contained in:
@@ -8,8 +8,6 @@ use windows::Win32::UI::WindowsAndMessaging::{
|
||||
GetWindowThreadProcessId, IsIconic, IsWindowVisible,
|
||||
};
|
||||
|
||||
const OCCLUDED_AREA_THRESHOLD: f64 = 1.0;
|
||||
|
||||
pub fn is_ads_webview_occluded(
|
||||
main_hwnd: HWND,
|
||||
x: i32,
|
||||
@@ -63,7 +61,7 @@ pub fn is_ads_webview_occluded(
|
||||
occluded_area.saturating_add(rect_area(&intersection));
|
||||
|
||||
if (occluded_area as f64 / ad_area as f64)
|
||||
>= OCCLUDED_AREA_THRESHOLD
|
||||
>= super::ads::OCCLUDED_AREA_THRESHOLD
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user