mutter/src/tests/stacking/closed-transient-no-default-focus.metatest
Sebastian Keller d85c3c1e94 tests/stacking: Add test for when no default focus window can be found
The previous commit removed checks for intermediate focus states which
would make tests randomly fail, because of their time dependence. What
can be tested however is that if there is no other window available that
would accept the focus, that the focus remains at 'none', after the
focused window has been closed. This newly introduced test checks the
focus directly after closing the window (and syncing) and after the time
it would have taken for the queue to finish. The first check has a
similar timing issue as the removed focus checks in the other tests, but
the test will never accidentally fail, because regardless of whether the
queue has finished or not, the focus is always expected to be 'none'.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1329
2020-06-26 21:00:12 +00:00

30 lines
344 B
Plaintext

new_client 1 x11
create 1/1
accept_focus 1/1 false
show 1/1
create 1/2 csd
set_parent 1/2 1
accept_focus 1/2 false
show 1/2
create 1/3 csd
set_parent 1/3 2
show 1/3
wait
assert_focused 1/3
assert_stacking 1/1 1/2 1/3
destroy 1/3
wait
assert_focused none
assert_stacking 1/1 1/2
sleep 150
wait
assert_focused none
assert_stacking 1/1 1/2