mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-07 13:29:59 -05:00
feat: respect the min and max size hint for the floating window
This commit is contained in:
parent
5e52921c80
commit
c8513da37e
3 changed files with 60 additions and 0 deletions
|
|
@ -1086,6 +1086,7 @@ int applyrulesgeom(Client *c) {
|
|||
|
||||
c->geom.width = r->width > 0 ? r->width : c->geom.width;
|
||||
c->geom.height = r->height > 0 ? r->height : c->geom.height;
|
||||
client_set_size_bound(c);
|
||||
|
||||
// 重新计算居中的坐标
|
||||
if (r->offsetx != 0 || r->offsety != 0 || r->width > 0 || r->height > 0)
|
||||
|
|
@ -1144,6 +1145,8 @@ void applyrules(Client *c) {
|
|||
if (r->height > 0)
|
||||
c->geom.height = r->height;
|
||||
|
||||
client_set_size_bound(c);
|
||||
|
||||
if (r->offsetx || r->offsety || r->width > 0 || r->height > 0) {
|
||||
hit_rule_pos = true;
|
||||
c->oldgeom = c->geom = setclient_coordinate_center(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue