This fixes a case where, after moving a window to another output and back,
the window would still appear on both outputs, even though it is not on
that output anymore, but only after switching workspaces once. Now the case
is fixed and per-workspace window-list functions better.
soreau,
created on Monday, 18 August 2025, 13:49:10 (1755524950),
received on Monday, 18 August 2025, 14:25:12 (1755527112)
Author identity: Scott Moreau <oreaus@gmail.com>
bd63a063611fe37e35ee0ef8ad0aa65bcfcf8b74
applets/wf-window-list/__init__.py
@@ -354,7 +354,7 @@ class WFWindowList(panorama_panel.Applet):
@@ -380,13 +380,14 @@ class WFWindowList(panorama_panel.Applet):
if view["output-name"] == self.get_root().monitor_name: output = self.get_wf_output_by_name(view["output-name"]) current_workspace = output["workspace"]["x"], output["workspace"]["y"]
button = self.toplevel_buttons_by_wf_id[view["id"]]
if not self.show_only_this_wf_workspace or (message["to"]["x"], message["to"]["y"]) == current_workspace: if self.toplevel_buttons_by_wf_id[view["id"]].get_parent() is None: self.append(self.toplevel_buttons_by_wf_id[view["id"]])
if button.get_parent() is None and button.output == self.my_output:
self.append(button)
else: if self.toplevel_buttons_by_wf_id[view["id"]].get_parent() is self:
if button.get_parent() is self:
# Remove out-of-workspace window self.remove(self.toplevel_buttons_by_wf_id[view["id"]])
self.remove(button)
case "wset-workspace-changed": output_name = self.get_root().monitor_name if message["wset-data"]["output-name"] == output_name:
@@ -439,7 +440,7 @@ class WFWindowList(panorama_panel.Applet):
mid_y = view["geometry"]["y"] + view["geometry"]["height"] / 2 output_width = output["geometry"]["width"] output_height = output["geometry"]["height"] if 0 <= mid_x < output_width and 0 <= mid_y < output_height:
if 0 <= mid_x < output_width and 0 <= mid_y < output_height and button.output == self.my_output:
# It is in this workspace; keep it if button.get_parent() is None: self.append(button)
@@ -523,10 +524,12 @@ class WFWindowList(panorama_panel.Applet):