Skip to content

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

feat(domain): set newly added windows as focus descendants

Lars Berger5418e24a8d51
diff --git a/GlazeWM.Domain/Windows/CommandHandlers/AddWindowHandler.cs b/GlazeWM.Domain/Windows/CommandHandlers/AddWindowHandler.cs
index e12185c0..11bf1ef4 100644
--- a/GlazeWM.Domain/Windows/CommandHandlers/AddWindowHandler.cs
+++ b/GlazeWM.Domain/Windows/CommandHandlers/AddWindowHandler.cs
@@ -57,8 +57,8 @@ namespace GlazeWM.Domain.Windows.CommandHandlers
// sibling of the focused container.
AttachChildWindow(window, targetParent);
- // Set focus to newly added window in case it has not been focused automatically.
- _bus.Invoke(new FocusWindowCommand(window));
+ // Set the newly added window as focus descendant.
+ _bus.Invoke(new SetFocusedDescendantCommand(window));
var parsedCommands = commandStrings
.Select(commandString => _commandParsingService.ParseCommand(commandString));