mirror of
https://github.com/brl/mutter.git
synced 2025-05-28 01:20:03 +00:00

Java applications might use override-redirect windows as parent windows for top-level windows, although this is not following the standard [1]. In such case, the first non-override-redirect child window that is created was marked as being on_all_workspaces since the call to should_be_on_all_workspaces() returns TRUE for its parent, and this even though the on_all_workspaces_requested bit is unset. When a further child of this window was added, it was set as not having a workspace and not being on_all_workspaces, since the call to should_be_on_all_workspaces() for its parent would return FALSE (unless if it is in a different monitor, and the multiple-monitors workspaces are disabled). Since per commit 09bab98b we don't recompute the workspace if the on_all_workspaces bit is unset, we could end up in a case where a window can be nor in all the workspaces or in a specific workspace. So let's just ignore the transient_for bit for a window if that points to an override-redirect, using the x11 root window instead. Add a stacking test to verify this scenario (was failing before of this commit). Fixes https://gitlab.gnome.org/GNOME/mutter/issues/885 https://gitlab.gnome.org/GNOME/mutter/merge_requests/895 [1] https://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472512128 (cherry picked from commit bacbbbd628fd68618f14bdf07ba3f9e6ccd1c038)