Commit 2fc7760c authored by Marco Trevisan's avatar Marco Trevisan 🎺 Committed by Jonas Ådahl

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 ended up in not changing the current_focus
window, causing a crash.

Added test cases that verify this situation.

Related to #308
!307
parent f2d2d473
......@@ -111,6 +111,9 @@ stacking_tests = [
'basic-wayland',
'client-side-decorated',
'closed-transient',
'closed-transient-no-input-no-take-focus-parent',
'closed-transient-no-input-no-take-focus-parents',
'closed-transient-no-input-parent',
'minimized',
'mixed-windows',
'set-parent',
......
new_client 1 x11
create 1/1
show 1/1
create 1/2 csd
set_parent 1/2 1
can_take_focus 1/2 false
accept_focus 1/2 false
show 1/2
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
can_take_focus 1/1 false
show 1/1
create 1/2 csd
set_parent 1/2 1
can_take_focus 1/2 false
accept_focus 1/2 false
show 1/2
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
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_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