diff --git a/src/background/seelen_bar/hook.rs b/src/background/seelen_bar/hook.rs index 9773f320..74fc8b5a 100644 --- a/src/background/seelen_bar/hook.rs +++ b/src/background/seelen_bar/hook.rs @@ -36,12 +36,6 @@ impl FancyToolbar { WinEvent::SyntheticFullscreenEnd(event_data) => { let monitor = WindowsApi::monitor_from_window(self.window.hwnd()?); if monitor == event_data.monitor { - log::trace!( - "Exit Fullscreen on {} || {} || {}", - WindowsApi::exe(origin).unwrap_or_default(), - WindowsApi::get_class(origin).unwrap_or_default(), - WindowsApi::get_window_text(origin) - ); self.show()?; } } diff --git a/src/background/winevent.rs b/src/background/winevent.rs index 29446b78..21441fa4 100644 --- a/src/background/winevent.rs +++ b/src/background/winevent.rs @@ -316,7 +316,10 @@ impl WinEvent { return None; } - if WindowsApi::is_fullscreen(origin).ok()? { + let fullscreened = trace_lock!(FULLSCREENED); + if WindowsApi::is_fullscreen(origin).ok()? + && !fullscreened.iter().any(|x| x.handle == origin) + { let data = SyntheticFullscreenData { handle: origin, monitor: WindowsApi::monitor_from_window(origin),