mirror of
https://github.com/brl/mutter.git
synced 2025-02-13 03:44:11 +00:00
window: Assert we only set a NULL workspace when unmanaging
There might be cases in which a window might be marked as both not in all workspaces and with NULL workspace. So to avoid this to happen, let's just assert early instead of doing this at later point where the context might not be clear. Related to https://gitlab.gnome.org/GNOME/mutter/issues/885 https://gitlab.gnome.org/GNOME/mutter/merge_requests/895 (cherry picked from commit 13f10e36e4ac162f0b54fa57de24120e0e5a5453)
This commit is contained in:
parent
4b238c10f4
commit
a8776a9634
@ -4826,9 +4826,12 @@ set_workspace_state (MetaWindow *window,
|
||||
{
|
||||
MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
|
||||
|
||||
/* If we're on all workspaces, then our new workspace must be NULL. */
|
||||
/* If we're on all workspaces, then our new workspace must be NULL,
|
||||
* otherwise it must be set, unless we're unmanaging. */
|
||||
if (on_all_workspaces)
|
||||
g_assert (workspace == NULL);
|
||||
g_assert_null (workspace);
|
||||
else
|
||||
g_assert_true (window->unmanaging || workspace != NULL);
|
||||
|
||||
/* If this is an override-redirect window, ensure that the only
|
||||
* times we're setting the workspace state is either during construction
|
||||
|
Loading…
x
Reference in New Issue
Block a user