Skip to content

Commit

Permalink
[x11 stacking] filter unknown windows
Browse files Browse the repository at this point in the history
There have been two recent reports of users seeing an error where
stacking fails because a window cannot be found in the X server's stack.
This shouldn't happen but let's filter out unknown windows.
  • Loading branch information
elParaguayo committed Jan 14, 2024
1 parent 6f1986f commit 3085d00
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libqtile/backend/x11/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,9 @@ def change_layer(self, up=True, top_bottom=False):
)
)

# Remove any windows that aren't in the server's stack
windows = list(filter(lambda w: w[0].wid in stack, windows))

# Sort this list to match stacking order reported by server
windows.sort(key=lambda w: stack.index(w[0].wid))

Expand Down

0 comments on commit 3085d00

Please sign in to comment.