Skip to content

Commit

Permalink
Fix fullscreen issue for Static windows
Browse files Browse the repository at this point in the history
  • Loading branch information
elParaguayo committed Jul 31, 2023
1 parent dcdbb6b commit 5aed9da
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions libqtile/backend/x11/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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()

0 comments on commit 5aed9da

Please sign in to comment.