From e333a330c0ddb07db39028fa8b3a47b3f7d21b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= <123550+andresilva@users.noreply.github.com> Date: Sat, 28 Feb 2026 18:19:29 +0000 Subject: desktop/group: fix movegroupwindow not following focus (#13426) --- hyprtester/src/tests/main/groups.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'hyprtester/src/tests/main/groups.cpp') diff --git a/hyprtester/src/tests/main/groups.cpp b/hyprtester/src/tests/main/groups.cpp index 3cf15851..6e7375ef 100644 --- a/hyprtester/src/tests/main/groups.cpp +++ b/hyprtester/src/tests/main/groups.cpp @@ -127,6 +127,34 @@ static bool test() { ret = 1; } + // test movegroupwindow: focus should follow the moved window + NLog::log("{}Test movegroupwindow focus follows window", Colors::YELLOW); + try { + auto str = getFromSocket("/activewindow"); + auto activeBeforeMove = std::stoull(str.substr(7, str.find(" -> ") - 7), nullptr, 16); + OK(getFromSocket("/dispatch movegroupwindow f")); + str = getFromSocket("/activewindow"); + auto activeAfterMove = std::stoull(str.substr(7, str.find(" -> ") - 7), nullptr, 16); + EXPECT(activeAfterMove, activeBeforeMove); + } catch (...) { + NLog::log("{}Fail at getting prop", Colors::RED); + ret = 1; + } + + // and backwards + NLog::log("{}Test movegroupwindow backwards", Colors::YELLOW); + try { + auto str = getFromSocket("/activewindow"); + auto activeBeforeMove = std::stoull(str.substr(7, str.find(" -> ") - 7), nullptr, 16); + OK(getFromSocket("/dispatch movegroupwindow b")); + str = getFromSocket("/activewindow"); + auto activeAfterMove = std::stoull(str.substr(7, str.find(" -> ") - 7), nullptr, 16); + EXPECT(activeAfterMove, activeBeforeMove); + } catch (...) { + NLog::log("{}Fail at getting prop", Colors::RED); + ret = 1; + } + NLog::log("{}Disable autogrouping", Colors::YELLOW); OK(getFromSocket("/keyword group:auto_group false")); -- cgit v1.2.3