mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
tests: Add test for maintaining constraints after client resizes
This test ensures that windows that were resized such that they extend beyond the screen will be moved to be fully on the screen (if possible). This has been working on X11 since forever, but on Wayland only since the last commit. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2103>
This commit is contained in:
parent
0e736af301
commit
b28a6e50a0
@ -293,6 +293,7 @@ stacking_tests = [
|
|||||||
'default-size',
|
'default-size',
|
||||||
'modals',
|
'modals',
|
||||||
'map-fixed-size',
|
'map-fixed-size',
|
||||||
|
'client-resize-respect-constraints',
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach stacking_test: stacking_tests
|
foreach stacking_test: stacking_tests
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
# Tests that constraints are applied after a client initiated resize
|
||||||
|
# 1. Create a window that does not extend beyond the screen
|
||||||
|
# 2. Move it to a known position
|
||||||
|
# 3. Resize such that the following resize will extend beyond the screen
|
||||||
|
# 4. Check that the window was moved to the position that would allow it to fit on the screen
|
||||||
|
|
||||||
|
new_client w wayland
|
||||||
|
create w/1 csd
|
||||||
|
|
||||||
|
resize w/1 500 400
|
||||||
|
show w/1
|
||||||
|
wait
|
||||||
|
|
||||||
|
assert_size w/1 500 400
|
||||||
|
|
||||||
|
move w/1 300 200
|
||||||
|
assert_position w/1 300 200
|
||||||
|
|
||||||
|
resize w/1 600 500
|
||||||
|
wait_reconfigure
|
||||||
|
assert_position w/1 200 100
|
||||||
|
|
||||||
|
destroy w/1
|
||||||
|
|
||||||
|
|
||||||
|
new_client x x11
|
||||||
|
create x/1 csd
|
||||||
|
|
||||||
|
resize x/1 500 400
|
||||||
|
show x/1
|
||||||
|
wait
|
||||||
|
|
||||||
|
assert_size x/1 500 400
|
||||||
|
|
||||||
|
move x/1 300 200
|
||||||
|
assert_position x/1 300 200
|
||||||
|
|
||||||
|
resize x/1 600 500
|
||||||
|
wait_reconfigure
|
||||||
|
assert_position x/1 200 100
|
||||||
|
|
||||||
|
destroy x/1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user