window: Warn if O-R window workspace state is used

Override-redirect windows have no workspace by default, and can't be parent
of a top-level window, so we must check that the parent window is not an
O-R one when setting the workspace state.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/895


(cherry picked from commit 2644e54c51)
This commit is contained in:
Marco Trevisan (Treviño) 2019-10-29 16:48:00 +00:00 committed by Marco Trevisan
parent 6fa860481c
commit 4b238c10f4

View File

@ -1306,6 +1306,7 @@ _meta_window_shared_new (MetaDisplay *display,
"Putting window %s on same workspace as parent %s\n",
window->desc, window->transient_for->desc);
g_warn_if_fail (!window->transient_for->override_redirect);
set_workspace_state (window,
should_be_on_all_workspaces (window->transient_for),
window->transient_for->workspace);