dekstop/window: read static rules before guessing initial size if possible (#12783)
This commit is contained in:
parent
9b93d621b1
commit
31d3181e1e
6 changed files with 45 additions and 8 deletions
|
|
@ -447,6 +447,39 @@ static void testBringActiveToTopMouseMovement() {
|
|||
Tests::killAllWindows();
|
||||
}
|
||||
|
||||
static void testInitialFloatSize() {
|
||||
NLog::log("{}Testing initial float size", Colors::GREEN);
|
||||
|
||||
Tests::killAllWindows();
|
||||
OK(getFromSocket("/keyword windowrule match:class kitty, float yes"));
|
||||
OK(getFromSocket("/keyword input:float_switch_override_focus 0"));
|
||||
|
||||
EXPECT(spawnKitty("kitty"), true);
|
||||
|
||||
{
|
||||
// Kitty by default opens as 640x400, if this changes this test will break
|
||||
auto str = getFromSocket("/clients");
|
||||
EXPECT(str.contains("size: 640,400"), true);
|
||||
}
|
||||
|
||||
OK(getFromSocket("/reload"));
|
||||
|
||||
Tests::killAllWindows();
|
||||
|
||||
OK(getFromSocket("/dispatch exec [float yes]kitty"));
|
||||
|
||||
Tests::waitUntilWindowsN(1);
|
||||
|
||||
{
|
||||
// Kitty by default opens as 640x400, if this changes this test will break
|
||||
auto str = getFromSocket("/clients");
|
||||
EXPECT(str.contains("size: 640,400"), true);
|
||||
EXPECT(str.contains("floating: 1"), true);
|
||||
}
|
||||
|
||||
Tests::killAllWindows();
|
||||
}
|
||||
|
||||
static bool test() {
|
||||
NLog::log("{}Testing windows", Colors::GREEN);
|
||||
|
||||
|
|
@ -877,12 +910,10 @@ static bool test() {
|
|||
Tests::killAllWindows();
|
||||
|
||||
testGroupRules();
|
||||
|
||||
testMaximizeSize();
|
||||
|
||||
testBringActiveToTopMouseMovement();
|
||||
|
||||
testGroupFallbackFocus();
|
||||
testInitialFloatSize();
|
||||
|
||||
NLog::log("{}Reloading config", Colors::YELLOW);
|
||||
OK(getFromSocket("/reload"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue