From d80f1944ef7c56948d1d92c4fcd9b4fb8bceea75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 4 Jul 2024 11:04:28 +0200 Subject: [PATCH] tests: Add tests for stickyness The test tests how sticky windows and their transient-for dialog windows behave together. Part-of: --- src/tests/meson.build | 1 + src/tests/stacking/sticky.metatest | 48 ++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 src/tests/stacking/sticky.metatest diff --git a/src/tests/meson.build b/src/tests/meson.build index 23ad92d98..42420116d 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -736,6 +736,7 @@ stacking_tests = [ 'sloppy-focus', 'sloppy-focus-pointer-rest', 'sloppy-focus-auto-raise', + 'sticky', 'strut-monitor-changes' ] diff --git a/src/tests/stacking/sticky.metatest b/src/tests/stacking/sticky.metatest new file mode 100644 index 000000000..f5b6b3bd1 --- /dev/null +++ b/src/tests/stacking/sticky.metatest @@ -0,0 +1,48 @@ +num_workspaces 2 +activate_workspace 0 + +new_client w wayland +create w/1 +show w/1 +stick w/1 +create w/2 +set_parent w/2 1 +show w/2 +wait +assert_stacking_showing w/1 w/2 + +activate_workspace 1 +assert_stacking_showing w/1 w/2 + +unstick w/1 +assert_sticky w/1 false +assert_sticky w/2 false +wait + +activate_workspace 0 +dispatch +assert_stacking_showing + +quit_client w + +new_client x x11 + +create x/1 +show x/1 +stick x/1 +create x/2 +set_parent x/2 1 +show x/2 +wait +assert_stacking_showing x/1 x/2 + +activate_workspace 1 +assert_stacking_showing x/1 x/2 + +unstick x/1 + +activate_workspace 0 +dispatch +assert_stacking_showing + +quit_client x