feat: respect the min and max size hint for the floating window

This commit is contained in:
DreamMaoMao 2025-08-05 12:30:06 +08:00
parent 47809c5783
commit c6102ddca1
3 changed files with 60 additions and 0 deletions

View file

@ -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(