Skip to content

Commit

Permalink
fix window iteration on config reload to only look at managed windows
Browse files Browse the repository at this point in the history
  • Loading branch information
aravinda0 authored and elParaguayo committed Jan 27, 2024
1 parent b6dbc23 commit 5279450
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions libqtile/backend/wayland/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1203,10 +1203,10 @@ def on_config_load(self, initial: bool) -> None:

assert self.qtile is not None

for win in self.qtile.windows_map.values():
if not isinstance(win, window.Window):
continue

managed_wins = [
w for w in self.qtile.windows_map.values() if isinstance(w, window.Window)
]
for win in managed_wins:
group = None
if win.group:
if win.group.name in self.qtile.groups_map:
Expand Down
8 changes: 5 additions & 3 deletions libqtile/backend/x11/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,11 @@ def on_config_load(self, initial) -> None:

if not initial:
# We are just reloading config
for win in self.qtile.windows_map.values():
if type(win) is window.Window:
win.set_group()
managed_wins = [
w for w in self.qtile.windows_map.values() if isinstance(w, window.Window)
]
for managed_win in managed_wins:
managed_win.set_group()
return

# Qtile just started - scan for clients
Expand Down

0 comments on commit 5279450

Please sign in to comment.