diff options
author | Joe <rbo@gmx.us> | 2025-03-01 23:35:40 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2025-03-01 23:35:40 +0100 |
commit | 80a2d8a025979931fd44c06089f55c52ec446f03 (patch) | |
tree | 278895ee7be0c35cc4ac332c3c66ec821af9b7cb /dwl.c | |
parent | scratchpads yey (diff) | |
download | dwl-80a2d8a025979931fd44c06089f55c52ec446f03.tar.gz dwl-80a2d8a025979931fd44c06089f55c52ec446f03.tar.bz2 dwl-80a2d8a025979931fd44c06089f55c52ec446f03.tar.xz dwl-80a2d8a025979931fd44c06089f55c52ec446f03.tar.zst dwl-80a2d8a025979931fd44c06089f55c52ec446f03.zip |
centered
Diffstat (limited to 'dwl.c')
-rw-r--r-- | dwl.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -584,6 +584,10 @@ applyrules(Client *c) newtags = p->tags; } } + if (mon) { + c->geom.x = (mon->w.width - c->geom.width) / 2 + mon->m.x; + c->geom.y = (mon->w.height - c->geom.height) / 2 + mon->m.y; + } setmon(c, mon, newtags); } @@ -2155,6 +2159,10 @@ mapnotify(struct wl_listener *listener, void *data) * try to apply rules for them */ if ((p = client_get_parent(c))) { c->isfloating = 1; + if (p->mon) { + c->geom.x = (p->mon->w.width - c->geom.width) / 2 + p->mon->m.x; + c->geom.y = (p->mon->w.height - c->geom.height) / 2 + p->mon->m.y; + } setmon(c, p->mon, p->tags); } else { applyrules(c); |