mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
window: Ignore requests to be placed on non-existent workspaces
When an X11 window requests an initial workspace, we currently trust it that the workspace actually exists. However dynamic workspaces make this easy to get wrong for applications: They make it likely for the number of workspaces to change between application starts, and if the app blindly applies its saved state on startup, it will trigger an assertion. Make sure that we pass valid parameters to set_workspace_state(), and simply let the workspace assignment fall through to the default handling otherwise. https://gitlab.gnome.org/GNOME/mutter/issues/1029
This commit is contained in:
parent
b91d66bf98
commit
aa0aa89a1e
@ -1288,6 +1288,9 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
window->initial_workspace);
|
||||
}
|
||||
|
||||
/* Ignore when a window requests to be placed on a non-existent workspace
|
||||
*/
|
||||
if (on_all_workspaces || workspace != NULL)
|
||||
set_workspace_state (window, on_all_workspaces, workspace);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user