mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-01 22:58:44 -04:00
fix: winrule offsetx and offsety not apply
This commit is contained in:
parent
c835f8e35b
commit
e3353b85f6
1 changed files with 2 additions and 4 deletions
|
|
@ -1790,8 +1790,7 @@ applyrulesgeom(Client *c) {
|
||||||
c->geom.width = r->width > 0 ? r->width : c->geom.width;
|
c->geom.width = r->width > 0 ? r->width : c->geom.width;
|
||||||
c->geom.height = r->height > 0 ? r->height : c->geom.height;
|
c->geom.height = r->height > 0 ? r->height : c->geom.height;
|
||||||
// 重新计算居中的坐标
|
// 重新计算居中的坐标
|
||||||
if (r->offsetx || r->offsety ||
|
if (r->offsetx || r->offsety)
|
||||||
(!client_is_x11(c) || !client_should_ignore_focus(c)))
|
|
||||||
c->geom = setclient_coordinate_center(c->geom, r->offsetx, r->offsety);
|
c->geom = setclient_coordinate_center(c->geom, r->offsetx, r->offsety);
|
||||||
hit = r->height > 0 || r->width > 0 || r->offsetx != 0 || r->offsety != 0
|
hit = r->height > 0 || r->width > 0 || r->offsetx != 0 || r->offsety != 0
|
||||||
? 1
|
? 1
|
||||||
|
|
@ -1864,8 +1863,7 @@ applyrules(Client *c) {
|
||||||
c->geom.width = r->width > 0 ? r->width : c->geom.width;
|
c->geom.width = r->width > 0 ? r->width : c->geom.width;
|
||||||
c->geom.height = r->height > 0 ? r->height : c->geom.height;
|
c->geom.height = r->height > 0 ? r->height : c->geom.height;
|
||||||
// 重新计算居中的坐标
|
// 重新计算居中的坐标
|
||||||
if (r->offsetx || r->offsety ||
|
if (r->offsetx || r->offsety)
|
||||||
(!client_is_x11(c) || !client_should_ignore_focus(c)))
|
|
||||||
c->oldgeom = c->geom =
|
c->oldgeom = c->geom =
|
||||||
setclient_coordinate_center(c->geom, r->offsetx, r->offsety);
|
setclient_coordinate_center(c->geom, r->offsetx, r->offsety);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue