mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-31 22:25:29 -04:00
feat: respect the min and max size hint for the floating window
This commit is contained in:
parent
47809c5783
commit
c6102ddca1
3 changed files with 60 additions and 0 deletions
|
|
@ -1077,6 +1077,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)
|
||||
|
|
@ -1135,6 +1136,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