windowrules: fix group rule recalcs (#12403)
This commit is contained in:
parent
00cce1c8ff
commit
c249a9f4b8
5 changed files with 83 additions and 3 deletions
|
|
@ -131,6 +131,68 @@ static void testSwapWindow() {
|
|||
EXPECT(Tests::windowCount(), 0);
|
||||
}
|
||||
|
||||
static void testGroupRules() {
|
||||
NLog::log("{}Testing group window rules", Colors::YELLOW);
|
||||
|
||||
OK(getFromSocket("/keyword general:border_size 8"));
|
||||
OK(getFromSocket("/keyword workspace w[tv1], bordersize:0"));
|
||||
OK(getFromSocket("/keyword workspace f[1], bordersize:0"));
|
||||
OK(getFromSocket("/keyword windowrule match:workspace w[tv1], border_size 0"));
|
||||
OK(getFromSocket("/keyword windowrule match:workspace f[1], border_size 0"));
|
||||
|
||||
if (!Tests::spawnKitty("kitty_A")) {
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
auto str = getFromSocket("/getprop active border_size");
|
||||
EXPECT_CONTAINS(str, "0");
|
||||
}
|
||||
|
||||
if (!Tests::spawnKitty("kitty_B")) {
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
auto str = getFromSocket("/getprop active border_size");
|
||||
EXPECT_CONTAINS(str, "8");
|
||||
}
|
||||
|
||||
OK(getFromSocket("/dispatch focuswindow class:kitty_A"));
|
||||
OK(getFromSocket("/dispatch togglegroup"));
|
||||
OK(getFromSocket("/dispatch focuswindow class:kitty_B"));
|
||||
OK(getFromSocket("/dispatch moveintogroup l"));
|
||||
|
||||
{
|
||||
auto str = getFromSocket("/getprop active border_size");
|
||||
EXPECT_CONTAINS(str, "0");
|
||||
}
|
||||
|
||||
OK(getFromSocket("/dispatch changegroupactive f"));
|
||||
|
||||
{
|
||||
auto str = getFromSocket("/getprop active border_size");
|
||||
EXPECT_CONTAINS(str, "0");
|
||||
}
|
||||
|
||||
if (!Tests::spawnKitty("kitty_C")) {
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
OK(getFromSocket("/dispatch moveoutofgroup r"));
|
||||
|
||||
{
|
||||
auto str = getFromSocket("/getprop active border_size");
|
||||
EXPECT_CONTAINS(str, "8");
|
||||
}
|
||||
|
||||
OK(getFromSocket("/reload"));
|
||||
Tests::killAllWindows();
|
||||
}
|
||||
|
||||
static bool test() {
|
||||
NLog::log("{}Testing windows", Colors::GREEN);
|
||||
|
||||
|
|
@ -403,6 +465,11 @@ static bool test() {
|
|||
|
||||
OK(getFromSocket("/dispatch plugin:test:check_rule"));
|
||||
|
||||
OK(getFromSocket("/reload"));
|
||||
Tests::killAllWindows();
|
||||
|
||||
testGroupRules();
|
||||
|
||||
NLog::log("{}Reloading config", Colors::YELLOW);
|
||||
OK(getFromSocket("/reload"));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue