From 97a66efcd8b49c195a248e3b555076738a08cb8b Mon Sep 17 00:00:00 2001 From: elParaguayo Date: Sun, 19 Nov 2023 10:01:50 +0000 Subject: [PATCH] [x11] Fix focus event on `Window.focus()` When calling `Window.focus()` the borders did not update on the focused window and the `WindowName` widget did not reflect the change. Fixes #3751 --- libqtile/backend/x11/window.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libqtile/backend/x11/window.py b/libqtile/backend/x11/window.py index abfa53ec31..6f3e78fd75 100644 --- a/libqtile/backend/x11/window.py +++ b/libqtile/backend/x11/window.py @@ -1327,12 +1327,12 @@ def focus(self, warp: bool = True) -> None: self.qtile.core._root.set_property("_NET_ACTIVE_WINDOW", self.window.wid) self._ungrab_click() - if self.group: - self.group.current_window = self - # Check if we need to restack a previously focused fullscreen window self.qtile.core.check_stacking(self) + if self.group and self.group.current_window is not self: + self.group.focus(self) + hook.fire("client_focus", self) @expose_command()