summaryrefslogtreecommitdiff
path: root/hyprtester/src/tests/main/misc.cpp
diff options
context:
space:
mode:
authorNikolai Nechaev <nikolay_nechaev@mail.ru>2025-11-26 07:44:26 +0900
committerGitHub <noreply@github.com>2025-11-25 22:44:26 +0000
commit40d8fa84919c6d0e9fcb1536f4bc09710d4c031c (patch)
treee45044c92e5d8f716f2aa15668c61fed5aaf5895 /hyprtester/src/tests/main/misc.cpp
parent1c1746de61a90dbbae072f3fc618c45af33fdd59 (diff)
compositor: Configurable behavior when window to be focused conflicts with fullscreen (#12033)
Renames `misc:new_window_takes_over_fullscreen` into `misc:on_focus_under_fullscreen` and implements the following behavior: - By default, when a tiling window is being focused on a workspace where a fullscreen/maximized window exists, respect the `misc:on_focus_under_fullscreen` config variable.
Diffstat (limited to 'hyprtester/src/tests/main/misc.cpp')
-rw-r--r--hyprtester/src/tests/main/misc.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/hyprtester/src/tests/main/misc.cpp b/hyprtester/src/tests/main/misc.cpp
index d5865f20..3187694b 100644
--- a/hyprtester/src/tests/main/misc.cpp
+++ b/hyprtester/src/tests/main/misc.cpp
@@ -53,7 +53,7 @@ static bool test() {
NLog::log("{}Testing new_window_takes_over_fullscreen", Colors::YELLOW);
- OK(getFromSocket("/keyword misc:new_window_takes_over_fullscreen 0"));
+ OK(getFromSocket("/keyword misc:on_focus_under_fullscreen 0"));
Tests::spawnKitty("kitty_A");
@@ -73,7 +73,16 @@ static bool test() {
EXPECT_CONTAINS(str, "kitty_A");
}
- OK(getFromSocket("/keyword misc:new_window_takes_over_fullscreen 1"));
+ OK(getFromSocket("/dispatch focuswindow class:kitty_B"));
+
+ {
+ // should be ignored as per focus_under_fullscreen 0
+ auto str = getFromSocket("/activewindow");
+ EXPECT_CONTAINS(str, "fullscreen: 2");
+ EXPECT_CONTAINS(str, "kitty_A");
+ }
+
+ OK(getFromSocket("/keyword misc:on_focus_under_fullscreen 1"));
Tests::spawnKitty("kitty_C");
@@ -83,7 +92,7 @@ static bool test() {
EXPECT_CONTAINS(str, "kitty_C");
}
- OK(getFromSocket("/keyword misc:new_window_takes_over_fullscreen 2"));
+ OK(getFromSocket("/keyword misc:on_focus_under_fullscreen 2"));
Tests::spawnKitty("kitty_D");
@@ -93,7 +102,7 @@ static bool test() {
EXPECT_CONTAINS(str, "kitty_D");
}
- OK(getFromSocket("/keyword misc:new_window_takes_over_fullscreen 0"));
+ OK(getFromSocket("/keyword misc:on_focus_under_fullscreen 0"));
Tests::killAllWindows();
@@ -138,6 +147,7 @@ static bool test() {
Tests::spawnKitty("kitty_A");
Tests::spawnKitty("kitty_B");
+ OK(getFromSocket("/dispatch focuswindow class:kitty_A"));
OK(getFromSocket("/dispatch fullscreen 0 set"));
{