Commit b0e4ab6a authored by Marco Trevisan's avatar Marco Trevisan 🎺

tests, stacking: Add tests with no-input and no-take-focus windows

When a window with no frame, that doesn't accept focus and that has no take-focus
atom set is destroyed, we end up in not changing the current_focus window, causing
a crash.

Added test cases that verify this situation (expected to fail).

See GNOME/mutter#308

GNOME/mutter!307
parent 32940c0e
......@@ -105,6 +105,9 @@ headless_start_test = executable('mutter-headless-start-test',
stacking_tests = files([
'stacking/basic-x11.metatest',
'stacking/basic-wayland.metatest',
'stacking/closed-transient-no-input-no-take-focus-parent.metatest',
'stacking/closed-transient-no-input-no-take-focus-parents.metatest',
'stacking/closed-transient-no-input-parent.metatest',
'stacking/minimized.metatest',
'stacking/mixed-windows.metatest',
'stacking/set-parent.metatest',
......
new_client 1 x11
create 1/1
show 1/1
wait
create 1/2 csd
set_parent 1/2 1
take_focus 1/2 false
accept_focus 1/2 false
show 1/2
wait
create 1/3 csd
set_parent 1/3 2
show 1/3
wait
assert_stacking 1/1 1/2 1/3
destroy 1/3
wait
assert_stacking 1/1 1/2
new_client 1 x11
create 1/1
accept_focus 1/1 false
take_focus 1/1 false
show 1/1
wait
create 1/2 csd
set_parent 1/2 1
take_focus 1/2 false
accept_focus 1/2 false
show 1/2
wait
create 1/3 csd
set_parent 1/3 2
show 1/3
wait
assert_stacking 1/1 1/2 1/3
destroy 1/3
wait
assert_stacking 1/1 1/2
new_client 1 x11
create 1/1
show 1/1
wait
create 1/2 csd
set_parent 1/2 1
accept_focus 1/2 false
show 1/2
wait
create 1/3 csd
set_parent 1/3 2
show 1/3
wait
assert_stacking 1/1 1/2 1/3
destroy 1/3
wait
assert_stacking 1/1 1/2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment