Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

fix: prevent focus requests from being lost from windows on inactive workspaces (#797)

DreamMaoMao3e2f5f26d3bc
diff --git a/packages/wm/src/common/events/handle_window_focused.rs b/packages/wm/src/common/events/handle_window_focused.rs
index 57e7bf0f..360b1721 100644
--- a/packages/wm/src/common/events/handle_window_focused.rs
+++ b/packages/wm/src/common/events/handle_window_focused.rs
@@ -24,10 +24,8 @@ pub fn handle_window_focused(
// Ignore the focus event if:
// 1. Window is being hidden by the WM.
// 2. Focus is already set to the WM's focused container.
- // 3. Window is not actually the foreground window.
if window.display_state() == DisplayState::Hiding
|| state.focused_container() == Some(window.clone().into())
- || Platform::foreground_window() != native_window
{
return Ok(());
}