Skip to content

x11/window: Update _NET_WM_DESKTOP when a window becomes all-workspace

When an X11 window becomes an all-workspace window its workspace is set to NULL before meta_window_x11_current_workspace_changed() is called. The latter then checks for workspace being NULL (which also happens when unmanaging) and then returns early. So this does not update _NET_WM_DESKTOP to 0xFFFFFFFF. Instead it remains at the workspace the window was on before. This was causing programs like wmctrl to switch to this old workspace when activating such a window.

Fix this by checking if the window is unmanaging instead.

Fixes: #2242 (closed)

Merge request reports