windowrules: fix persistent_size not applying (#12441)

This commit is contained in:
EvilLary 2025-11-25 02:48:10 +03:00 committed by GitHub
parent 3d7ea9c02f
commit 475e87b351
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 33 additions and 4 deletions

View file

@ -397,6 +397,34 @@ static bool test() {
OK(getFromSocket("/reload"));
Tests::killAllWindows();
// test persistent_size between floating window launches
OK(getFromSocket("/keyword windowrule match:class persistent_size_kitty, persistent_size true, float true"));
if (!spawnKitty("persistent_size_kitty"))
return false;
OK(getFromSocket("/dispatch resizeactive exact 600 400"))
{
auto str = getFromSocket("/activewindow");
EXPECT_CONTAINS(str, "size: 600,400");
EXPECT_CONTAINS(str, "floating: 1");
}
Tests::killAllWindows();
if (!spawnKitty("persistent_size_kitty"))
return false;
{
auto str = getFromSocket("/activewindow");
EXPECT_CONTAINS(str, "size: 600,400");
EXPECT_CONTAINS(str, "floating: 1");
}
OK(getFromSocket("/reload"));
Tests::killAllWindows();
OK(getFromSocket("/keyword general:border_size 0"));
OK(getFromSocket("/keyword windowrule match:float true, border_size 10"));