mutter/src/tests/stacking/closed-transient-only-take-focus-parents.metatest
Sebastian Keller c3d1320343 tests/stacking: Avoid random failures in focus tests
Some tests were not waiting for the test client to actually issue
destroy commands before checking their effect on the window focus.

Similarly when mutter is supposed to change the focus based on a delay
by sending a WM_TAKE_FOCUS to the client, this also could fail without
synchronization with the client before checking the result.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1325
2020-06-21 05:00:03 +02:00

37 lines
485 B
Plaintext

new_client 0 x11
create 0/1
show 0/1
new_client 1 x11
create 1/1
accept_focus 1/1 false
can_take_focus 1/1 true
accept_take_focus 1/1 true
show 1/1
create 1/2 csd
set_parent 1/2 1
accept_focus 1/2 false
can_take_focus 1/2 true
accept_take_focus 1/2 true
show 1/2
create 1/3
set_parent 1/3 2
show 1/3
assert_focused 1/3
assert_stacking 0/1 1/1 1/2 1/3
destroy 1/3
wait
assert_focused 1/2
assert_stacking 0/1 1/1 1/2
sleep 150
wait
assert_focused 1/2
assert_stacking 0/1 1/1 1/2