From 9374fad2b421b8f59f18e09b0922e6214e11e63f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 16 May 2023 16:33:54 +0200 Subject: [PATCH] tests/stacking: Add test for strut changes together with monitors changes We have an issue causing windows to be hidden below struts when monitor changes events happen. While this was easily reproducible in gnome-shell we had not a mutter stacking test checking it. Here it is now. Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/1627 Part-of: --- src/tests/meson.build | 2 ++ .../stacking/strut-monitor-changes.metatest | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 src/tests/stacking/strut-monitor-changes.metatest diff --git a/src/tests/meson.build b/src/tests/meson.build index 8d034552b..7388943c5 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -731,6 +731,7 @@ stacking_tests = [ 'sloppy-focus', 'sloppy-focus-pointer-rest', 'sloppy-focus-auto-raise', + 'strut-monitor-changes' ] foreach stacking_test: stacking_tests @@ -742,6 +743,7 @@ foreach stacking_test: stacking_tests ], is_parallel: false, timeout: 60, + should_fail: stacking_test.startswith('fixme-'), ) if have_installed_tests diff --git a/src/tests/stacking/strut-monitor-changes.metatest b/src/tests/stacking/strut-monitor-changes.metatest new file mode 100644 index 000000000..65226a6e2 --- /dev/null +++ b/src/tests/stacking/strut-monitor-changes.metatest @@ -0,0 +1,33 @@ +new_client w wayland +create w/1 csd + +show w/1 +wait + +maximize w/1 +wait_reconfigure w/1 +assert_position w/1 0 0 +assert_size w/1 MONITOR_WIDTH MONITOR_HEIGHT + +set_strut 0 0 MONITOR_WIDTH MONITOR_HEIGHT*0.2 top +reload_monitors +wait_reconfigure w/1 +assert_position w/1 0 MONITOR_HEIGHT*0.2 +assert_size w/1 MONITOR_WIDTH MONITOR_HEIGHT*0.8 + +reload_monitors +add_strut 0 0 MONITOR_WIDTH/2 MONITOR_HEIGHT left + +wait_reconfigure w/1 +assert_position w/1 MONITOR_WIDTH/2 MONITOR_HEIGHT*0.2 +assert_size w/1 MONITOR_WIDTH/2 MONITOR_HEIGHT*0.8 + +clear_struts left +# A Monitor reconfiguration in between strut changes is causing troubles, see: +# https://gitlab.gnome.org/GNOME/mutter/-/issues/1627 +reload_monitors +add_strut 0 0 MONITOR_WIDTH/2 MONITOR_HEIGHT left + +wait_reconfigure w/1 +assert_position w/1 MONITOR_WIDTH/2 MONITOR_HEIGHT*0.2 +assert_size w/1 MONITOR_WIDTH/2 MONITOR_HEIGHT*0.8