mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-20 21:38:15 -04:00
feat(window_rule): support width/height as fractions in window rules.
This commit is contained in:
parent
49921eadfa
commit
a25e2a9b1c
2 changed files with 10 additions and 6 deletions
|
|
@ -1360,10 +1360,14 @@ void applyrules(Client *c) {
|
|||
|
||||
// set geometry of floating client
|
||||
|
||||
if (r->width > 0)
|
||||
if (r->width > 1)
|
||||
c->float_geom.width = r->width;
|
||||
if (r->height > 0)
|
||||
else if (r->width > 0 && r->width <= 1)
|
||||
c->float_geom.width = round(mon->m.width * r->width);
|
||||
if (r->height > 1)
|
||||
c->float_geom.height = r->height;
|
||||
else if (r->height > 0 && r->height <= 1)
|
||||
c->float_geom.height = round(mon->m.height * r->height);
|
||||
|
||||
if (r->width > 0 || r->height > 0) {
|
||||
c->iscustomsize = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue