mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
update: update offsetx and offsety logic
This commit is contained in:
parent
e8fe574632
commit
99770aa890
1 changed files with 2 additions and 2 deletions
|
|
@ -1807,7 +1807,7 @@ setclient_coordinate_center(Client *c, struct wlr_box geom, int offsetx,
|
|||
tempbox.height = geom.height;
|
||||
|
||||
if (offsetx != 0) {
|
||||
len = m->w.width / 2;
|
||||
len = (m->w.width - c->geom.width - 2 * m->gappoh) / 2;
|
||||
offset = len * (offsetx / 100.0);
|
||||
tempbox.x += offset;
|
||||
|
||||
|
|
@ -1820,7 +1820,7 @@ setclient_coordinate_center(Client *c, struct wlr_box geom, int offsetx,
|
|||
}
|
||||
}
|
||||
if (offsety != 0) {
|
||||
len = m->w.height;
|
||||
len = (m->w.height - c->geom.height - 2 * m->gappov) / 2;
|
||||
offset = len * (offsety / 100.0);
|
||||
tempbox.y += offset;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue