mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-19 21:38:07 -04:00
Merge pull request #597 from levnikmyskin/main
Support width/height as fractions in window rules. Closes #552
This commit is contained in:
commit
cb99edd266
2 changed files with 10 additions and 6 deletions
|
|
@ -1584,10 +1584,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