From fc735e9d8454a456552e2c08839ebb30d1119cd8 Mon Sep 17 00:00:00 2001 From: elParaguayo Date: Fri, 25 Oct 2024 17:27:05 +0100 Subject: [PATCH] Stop windows floating if not focused when added to group --- libqtile/group.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libqtile/group.py b/libqtile/group.py index 22b2b88431..fbfff4518f 100644 --- a/libqtile/group.py +++ b/libqtile/group.py @@ -265,8 +265,10 @@ def add(self, win, focus=True, force=False): self.tiled_windows.add(win) for i in self.layouts: i.add_client(win) - if focus: + if focus or not self.current_window: self.focus(win, warp=True, force=force) + elif self.current_window: + self.focus(self.current_window, warp=False) def remove(self, win, force=False): self.windows.remove(win)