mirror of
https://github.com/brl/mutter.git
synced 2025-01-12 04:34:40 +00:00
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 https://gitlab.gnome.org/GNOME/mutter/issues/308
https://gitlab.gnome.org/GNOME/mutter/merge_requests/307
(cherry picked from commit 2fc7760cee
)
This commit is contained in:
parent
ac1503a559
commit
1ebf32187a
@ -15,6 +15,9 @@ dist_stacking_DATA = \
|
||||
tests/stacking/basic-x11.metatest \
|
||||
tests/stacking/basic-wayland.metatest \
|
||||
tests/stacking/closed-transient.metatest \
|
||||
tests/stacking/closed-transient-no-input-no-take-focus-parent.metatest \
|
||||
tests/stacking/closed-transient-no-input-no-take-focus-parents.metatest \
|
||||
tests/stacking/closed-transient-no-input-parent.metatest \
|
||||
tests/stacking/minimized.metatest \
|
||||
tests/stacking/mixed-windows.metatest \
|
||||
tests/stacking/set-parent.metatest \
|
||||
|
@ -0,0 +1,21 @@
|
||||
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
|
@ -0,0 +1,23 @@
|
||||
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
|
20
src/tests/stacking/closed-transient-no-input-parent.metatest
Normal file
20
src/tests/stacking/closed-transient-no-input-parent.metatest
Normal file
@ -0,0 +1,20 @@
|
||||
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
|
Loading…
Reference in New Issue
Block a user