wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

Unmapped views spam during VT switches.

Open killown opened this issue 3 months ago • 4 comments

Describe the bug Go to any tty, wait for some seconds and switch back for the compositor, the following will happen while watching the view-set-output event:

In [2]: sock.watch(["view-set-output"])
Out[2]: {'result': 'ok'}

In [3]: while True:
   ...:     event = sock.read_next_event()
   ...:     print(event, "\n")
   ...:
{'event': 'view-set-output', 'output': {'id': 38, 'name': 'DP-1', 'geometry': {'x': 2560, 'y': 0, 'width': 1920, 'height': 1080}, 'workarea': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'wset-index': 6, 'workspace': {'x': 0, 'y': 0, 'grid_width': 3, 'grid_height': 3}}, 'view': {'id': 15, 'pid': 103975, 'title': 'IPython: home/neo', 'app-id': 'kitty', 'base-geometry': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'bbox': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'output-id': 4294967295, 'output-name': 'null', 'last-focus-timestamp': 14869412931181, 'role': 'toplevel', 'mapped': True, 'layer': 'none', 'tiled-edges': 15, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': 1, 'min-size': {'width': 0, 'height': 0}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'toplevel'}}

{'event': 'view-set-output', 'output': {'id': 38, 'name': 'DP-1', 'geometry': {'x': 2560, 'y': 0, 'width': 1920, 'height': 1080}, 'workarea': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'wset-index': 6, 'workspace': {'x': 0, 'y': 0, 'grid_width': 3, 'grid_height': 3}}, 'view': {'id': 48, 'pid': 105043, 'title': 'IPython: home/neo', 'app-id': 'Alacritty', 'base-geometry': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'bbox': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'output-id': 4294967295, 'output-name': 'null', 'last-focus-timestamp': 14876144845758, 'role': 'toplevel', 'mapped': True, 'layer': 'none', 'tiled-edges': 15, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': 1, 'min-size': {'width': 2, 'height': 1}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'toplevel'}}

{'event': 'view-set-output', 'output': {'id': 38, 'name': 'DP-1', 'geometry': {'x': 2560, 'y': 0, 'width': 1920, 'height': 1080}, 'workarea': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'wset-index': 6, 'workspace': {'x': 0, 'y': 0, 'grid_width': 3, 'grid_height': 3}}, 'view': {'id': 42, 'pid': -1, 'title': 'layer-shell', 'app-id': 'swww-daemon', 'base-geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'bbox': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'output-id': 4294967295, 'output-name': 'null', 'last-focus-timestamp': 0, 'role': 'desktop-environment', 'mapped': False, 'layer': 'background', 'tiled-edges': 0, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': -1, 'min-size': {'width': 0, 'height': 0}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'background'}}

{'event': 'view-set-output', 'output': {'id': 40, 'name': 'DP-2', 'geometry': {'x': 0, 'y': 0, 'width': 2560, 'height': 1080}, 'workarea': {'x': 0, 'y': 0, 'width': 2560, 'height': 1080}, 'wset-index': 7, 'workspace': {'x': 0, 'y': 0, 'grid_width': 3, 'grid_height': 3}}, 'view': {'id': 43, 'pid': -1, 'title': 'layer-shell', 'app-id': 'swww-daemon', 'base-geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'bbox': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'output-id': 4294967295, 'output-name': 'null', 'last-focus-timestamp': 0, 'role': 'desktop-environment', 'mapped': False, 'layer': 'background', 'tiled-edges': 0, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': -1, 'min-size': {'width': 0, 'height': 0}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'background'}}

{'event': 'view-set-output', 'output': None, 'view': {'id': 59, 'pid': -1, 'title': 'layer-shell', 'app-id': '', 'base-geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'bbox': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'output-id': 56, 'output-name': 'NOOP-1', 'last-focus-timestamp': 0, 'role': 'desktop-environment', 'mapped': False, 'layer': 'none', 'tiled-edges': 0, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': -1, 'min-size': {'width': 0, 'height': 0}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'unknown'}}

{'event': 'view-set-output', 'output': None, 'view': {'id': 15, 'pid': 103975, 'title': 'IPython: home/neo', 'app-id': 'kitty', 'base-geometry': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'bbox': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'output-id': 60, 'output-name': 'DP-1', 'last-focus-timestamp': 14869412931181, 'role': 'toplevel', 'mapped': True, 'layer': 'workspace', 'tiled-edges': 15, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': 1, 'min-size': {'width': 0, 'height': 0}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'toplevel'}}

{'event': 'view-set-output', 'output': None, 'view': {'id': 48, 'pid': 105043, 'title': 'IPython: home/neo', 'app-id': 'Alacritty', 'base-geometry': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'bbox': {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}, 'output-id': 60, 'output-name': 'DP-1', 'last-focus-timestamp': 14876144845758, 'role': 'toplevel', 'mapped': True, 'layer': 'workspace', 'tiled-edges': 15, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': 1, 'min-size': {'width': 2, 'height': 1}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'toplevel'}}

{'event': 'view-set-output', 'output': None, 'view': {'id': 64, 'pid': -1, 'title': 'layer-shell', 'app-id': '', 'base-geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'bbox': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'output-id': 60, 'output-name': 'DP-1', 'last-focus-timestamp': 0, 'role': 'desktop-environment', 'mapped': False, 'layer': 'none', 'tiled-edges': 0, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': -1, 'min-size': {'width': 0, 'height': 0}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'unknown'}}

{'event': 'view-set-output', 'output': None, 'view': {'id': 65, 'pid': -1, 'title': 'layer-shell', 'app-id': '', 'base-geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'bbox': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'output-id': 62, 'output-name': 'DP-2', 'last-focus-timestamp': 0, 'role': 'desktop-environment', 'mapped': False, 'layer': 'none', 'tiled-edges': 0, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': -1, 'min-size': {'width': 0, 'height': 0}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'unknown'}}

{'event': 'view-set-output', 'output': {'id': 56, 'name': 'NOOP-1', 'geometry': {'x': 2560, 'y': 0, 'width': 1280, 'height': 720}, 'workarea': {'x': 0, 'y': 0, 'width': 1280, 'height': 720}, 'wset-index': 6, 'workspace': {'x': 0, 'y': 0, 'grid_width': 3, 'grid_height': 3}}, 'view': {'id': 59, 'pid': -1, 'title': 'layer-shell', 'app-id': '', 'base-geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'bbox': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'output-id': 4294967295, 'output-name': 'null', 'last-focus-timestamp': 0, 'role': 'desktop-environment', 'mapped': False, 'layer': 'none', 'tiled-edges': 0, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': -1, 'min-size': {'width': 0, 'height': 0}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'unknown'}}

{'event': 'view-set-output', 'output': None, 'view': {'id': 66, 'pid': -1, 'title': 'layer-shell', 'app-id': '', 'base-geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'bbox': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'output-id': 60, 'output-name': 'DP-1', 'last-focus-timestamp': 0, 'role': 'desktop-environment', 'mapped': False, 'layer': 'none', 'tiled-edges': 0, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': -1, 'min-size': {'width': 0, 'height': 0}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'unknown'}}

{'event': 'view-set-output', 'output': None, 'view': {'id': 67, 'pid': -1, 'title': 'layer-shell', 'app-id': '', 'base-geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'bbox': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'output-id': 60, 'output-name': 'DP-1', 'last-focus-timestamp': 0, 'role': 'desktop-environment', 'mapped': False, 'layer': 'none', 'tiled-edges': 0, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': -1, 'min-size': {'width': 0, 'height': 0}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'unknown'}}

{'event': 'view-set-output', 'output': None, 'view': {'id': 68, 'pid': -1, 'title': 'layer-shell', 'app-id': '', 'base-geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'bbox': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'output-id': 60, 'output-name': 'DP-1', 'last-focus-timestamp': 0, 'role': 'desktop-environment', 'mapped': False, 'layer': 'none', 'tiled-edges': 0, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': -1, 'min-size': {'width': 0, 'height': 0}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'unknown'}}

{'event': 'view-set-output', 'output': None, 'view': {'id': 69, 'pid': -1, 'title': 'layer-shell', 'app-id': '', 'base-geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'parent': -1, 'geometry': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'bbox': {'x': 0, 'y': 0, 'width': 0, 'height': 0}, 'output-id': 60, 'output-name': 'DP-1', 'last-focus-timestamp': 0, 'role': 'desktop-environment', 'mapped': False, 'layer': 'none', 'tiled-edges': 0, 'fullscreen': False, 'minimized': False, 'activated': False, 'sticky': False, 'wset-index': -1, 'min-size': {'width': 0, 'height': 0}, 'max-size': {'width': 0, 'height': 0}, 'focusable': True, 'type': 'unknown'}}

The spam will keep going until switch back for the compositor

killown avatar Sep 06 '25 05:09 killown

This is the same as the whole VT switch issue that was introduced in wlroots 0.19, needs a wlroots fix, or for wlroots to split the wlr_output API so that we can fix it ourselves.

ammen99 avatar Sep 09 '25 20:09 ammen99

I know, it is not fatal but it is annoying. Also, with simple-tile, it forgets which windows are minimised, where the windows are, and what the split position is.

Secret-chest avatar Sep 10 '25 04:09 Secret-chest

Might this be a related to an issue I'm seeing where all windows huddle up into the first workspace when VT switching?

Are the windows scared and need to be close together to feel safe?? 🥺

tombh avatar Oct 06 '25 19:10 tombh

Might this be a related to an issue I'm seeing where all windows huddle up into the first workspace when VT switching?

Are the windows scared and need to be close together to feel safe?? 🥺

Yes, this is the same issue. Try the preserve-output plugin, it will help if you disconnect and reconnect again. Keep in mind the windows will however remain on a "virtual" output until the actual output comes back; you can recover the windows by using the wsets plugin in such cases.

ammen99 avatar Oct 06 '25 19:10 ammen99