desktop/windowRule: allow expression in min_size/max_size (#12977)
This commit is contained in:
parent
e7985ca4c4
commit
22fc8136a2
4 changed files with 48 additions and 10 deletions
|
|
@ -970,7 +970,8 @@ static bool test() {
|
|||
Tests::killAllWindows();
|
||||
|
||||
// test expression rules
|
||||
OK(getFromSocket("/keyword windowrule match:class expr_kitty, float yes, size monitor_w*0.5 monitor_h*0.5, move 20+(monitor_w*0.1) monitor_h*0.5"));
|
||||
OK(getFromSocket("/keyword windowrule match:class expr_kitty, float yes, size monitor_w*0.5 monitor_h*0.5, min_size monitor_w*0.25 monitor_h*0.25, "
|
||||
"max_size monitor_w*0.75 monitor_h*0.75, move 20+(monitor_w*0.1) monitor_h*0.5"));
|
||||
|
||||
if (!spawnKitty("expr_kitty"))
|
||||
return false;
|
||||
|
|
@ -980,6 +981,14 @@ static bool test() {
|
|||
EXPECT_CONTAINS(str, "floating: 1");
|
||||
EXPECT_CONTAINS(str, "at: 212,540");
|
||||
EXPECT_CONTAINS(str, "size: 960,540");
|
||||
|
||||
auto min = getFromSocket("/getprop active min_size");
|
||||
EXPECT_CONTAINS(min, "480");
|
||||
EXPECT_CONTAINS(min, "270");
|
||||
|
||||
auto max = getFromSocket("/getprop active max_size");
|
||||
EXPECT_CONTAINS(max, "1440");
|
||||
EXPECT_CONTAINS(max, "810");
|
||||
}
|
||||
|
||||
OK(getFromSocket("/reload"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue