diff --git a/libqtile/backend/x11/window.py b/libqtile/backend/x11/window.py index 8dda6bdb44..49f8073250 100644 --- a/libqtile/backend/x11/window.py +++ b/libqtile/backend/x11/window.py @@ -1290,10 +1290,6 @@ def focus(self, warp: bool = True) -> None: if self.group: self.group.current_window = self - # See https://github.com/qtile/qtile/pull/3409#discussion_r1117952134 for discussion - # on mypy error here - if self.fullscreen and not self.previous_layer[4]: # type: ignore - self.change_layer() # Check if we need to restack a previously focused fullscreen window self.qtile.core.check_stacking(self) @@ -1627,9 +1623,9 @@ def bring_to_front(self): if self.get_wm_type() != "desktop": self.window.configure(stackmode=xcffib.xproto.StackMode.Above) - @property - def fullscreen(self): - return False + # @property + # def fullscreen(self): + # return False class Window(_Window, base.Window): @@ -2257,3 +2253,13 @@ def set_position(self, x, y): if self._is_in_window(curx, cury, window): self.group.layout.swap(self, window) return + + @expose_command + def focus(self, warp: bool = True) -> None: + """Focus the window.""" + _Window.focus(self, warp) + + # Focusing a fullscreen window puts it into a different layer + # priority group. If it's not there already, we need to move it. + if self.fullscreen and not self.previous_layer[4]: + self.change_layer()