Skip to content

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

fix: window effects not applied on manage (#945)

Lars Bergerd574060632cd
diff --git a/packages/wm/src/commands/window/manage_window.rs b/packages/wm/src/commands/window/manage_window.rs
index 8b9f9f44..d3b7e8c6 100644
--- a/packages/wm/src/commands/window/manage_window.rs
+++ b/packages/wm/src/commands/window/manage_window.rs
@@ -52,6 +52,15 @@ pub fn manage_window(
// already focused.
state.pending_sync.queue_focus_change();
+ // Normally, a `PlatformEvent::WindowFocused` event is what triggers
+ // focus effects and workspace reordering to be applied. However, when
+ // a window is first launched, this event can come before the
+ // window is managed, and so we need to force an update here.
+ state.pending_sync.queue_focused_effect_update();
+ state.pending_sync.queue_workspace_to_reorder(
+ window.workspace().context("No workspace.")?,
+ );
+
// Sibling containers need to be redrawn if the window is tiling.
state.pending_sync.queue_container_to_redraw(
if window.state() == WindowState::Tiling {