mutter/src/tests/stacking
Marco Trevisan (Treviño) 7c1f3498fe window-props: Don't set override redirect windows as top-level parent
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 bacbbbd628)
2019-11-07 16:21:37 +00:00
..
basic-wayland.metatest Add a test framework and stacking tests 2014-09-12 13:14:51 -04:00
basic-x11.metatest Add a test framework and stacking tests 2014-09-12 13:14:51 -04:00
client-side-decorated.metatest Don't restack windows while we are unmanaging them 2014-09-16 13:44:42 -04:00
closed-transient-no-input-no-take-focus-parent.metatest tests: Verify focused window in closed-transient tests 2019-06-24 09:42:07 +00:00
closed-transient-no-input-no-take-focus-parents.metatest tests: Verify focused window in closed-transient tests 2019-06-24 09:42:07 +00:00
closed-transient-no-input-parent-delayed-focus-default-cancelled.metatest metatest: Dispatch the destruction instead of sleeping after it 2019-07-08 11:21:17 +02:00
closed-transient-no-input-parent.metatest window-x11: Use any focusable window as fallback delayed focus window 2019-07-08 11:46:52 +02:00
closed-transient-no-input-parents-queued-default-focus-destroyed.metatest window-x11: Use any focusable window as fallback delayed focus window 2019-07-08 11:46:52 +02:00
closed-transient-no-input-parents.metatest window-x11: Use any focusable window as fallback delayed focus window 2019-07-08 11:46:52 +02:00
closed-transient-only-take-focus-parents.metatest window-x11: Use any focusable window as fallback delayed focus window 2019-07-08 11:46:52 +02:00
closed-transient.metatest tests: Add "closed-transient" test 2018-07-30 17:48:42 +00:00
minimized.metatest Add a test for stacking vs. minimization 2014-09-24 16:51:20 -04:00
mixed-windows.metatest Add a test framework and stacking tests 2014-09-12 13:14:51 -04:00
override-redirect.metatest test-runner: represent the guard window as '|' for assert_stacking 2014-09-24 16:26:17 -04:00
set-override-redirect-parent.metatest window-props: Don't set override redirect windows as top-level parent 2019-11-07 16:21:37 +00:00
set-parent-exported.metatest tests: Add the "parent_exported" test 2018-07-18 14:31:38 +02:00
set-parent.metatest tests: Add test for testing that setting a parent affects the stack 2015-12-23 14:59:36 +08:00