From 989cc2e2476691361f9afa41dbd94a8a702b19c0 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Fri, 29 Oct 2021 21:34:09 +0200 Subject: [PATCH] tests: Add test for unfullscreening followed by immediate strut change Part-of: --- src/tests/meson.build | 1 + .../unfullscreen-strut-change.metatest | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 src/tests/stacking/unfullscreen-strut-change.metatest diff --git a/src/tests/meson.build b/src/tests/meson.build index 3d0aec394..d084887be 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -288,6 +288,7 @@ stacking_tests = [ 'restore-size', 'unmaximize-new-size', 'fullscreen-maximize', + 'unfullscreen-strut-change', 'restore-position', 'default-size', 'modals', diff --git a/src/tests/stacking/unfullscreen-strut-change.metatest b/src/tests/stacking/unfullscreen-strut-change.metatest new file mode 100644 index 000000000..1a0005428 --- /dev/null +++ b/src/tests/stacking/unfullscreen-strut-change.metatest @@ -0,0 +1,49 @@ +# Tests that the following works, both on Wayland and X11 +# 1. Create a window with a known size +# 2. Fullscreen window results in fullscreen size +# 3. Unfullscreen window followed by a strut change returns to known size + +new_client w wayland +create w/1 csd + +resize w/1 500 400 +show w/1 +wait + +assert_size w/1 500 400 + +fullscreen w/1 +wait_reconfigure +assert_size w/1 MONITOR_WIDTH MONITOR_HEIGHT + +stop_after_next w +unfullscreen w/1 +wait +set_strut 0 0 1 1 top +continue w +wait_reconfigure +assert_size w/1 500 400 + +clear_struts +wait + +new_client x x11 +create x/1 csd + +resize x/1 500 400 +show x/1 +wait + +assert_size x/1 500 400 + +fullscreen x/1 +wait_reconfigure +assert_size x/1 MONITOR_WIDTH MONITOR_HEIGHT + +stop_after_next x +unfullscreen x/1 +wait +set_strut 0 0 1 1 top +continue x +wait_reconfigure +assert_size x/1 500 400