mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 12:52:14 +00:00
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: https://gitlab.gnome.org/GNOME/mutter/-/issues/2242 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2387>
This commit is contained in:
parent
f361e8032c
commit
5e5480e620
@ -1308,11 +1308,8 @@ meta_window_x11_current_workspace_changed (MetaWindow *window)
|
|||||||
*/
|
*/
|
||||||
unsigned long data[1];
|
unsigned long data[1];
|
||||||
|
|
||||||
if (window->workspace == NULL)
|
if (window->unmanaging)
|
||||||
{
|
return;
|
||||||
/* this happens when unmanaging windows */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
data[0] = meta_window_get_net_wm_desktop (window);
|
data[0] = meta_window_get_net_wm_desktop (window);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user