Skip to content

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

feat(domain): update focus state in `WindowFocusedHandler`

Lars Berger0684b166c70c
diff --git a/GlazeWM.Domain/Windows/EventHandlers/WindowFocusedHandler.cs b/GlazeWM.Domain/Windows/EventHandlers/WindowFocusedHandler.cs
index 7aa21a2a..4d43304b 100644
--- a/GlazeWM.Domain/Windows/EventHandlers/WindowFocusedHandler.cs
+++ b/GlazeWM.Domain/Windows/EventHandlers/WindowFocusedHandler.cs
@@ -1,5 +1,7 @@
using System.Linq;
using GlazeWM.Domain.Containers;
+using GlazeWM.Domain.Containers.Commands;
+using GlazeWM.Domain.Containers.Events;
using GlazeWM.Domain.Windows.Commands;
using GlazeWM.Domain.Workspaces;
using GlazeWM.Domain.Workspaces.Commands;
@@ -44,7 +46,8 @@ namespace GlazeWM.Domain.Windows.EventHandlers
if (window == null)
return;
- _bus.Invoke(new FocusWindowCommand(window));
+ _bus.Invoke(new SetFocusedDescendantCommand(window));
+ _bus.RaiseEvent(new FocusChangedEvent(window));
}
}
}