~ruther/dwl

c86717454d4cd9c8d65cd03c765195a6d0bad1ae — Guido Cella 10 months ago bd59573 v0.7/alwayscenter
center floating windows
1 files changed, 8 insertions(+), 0 deletions(-)

M dwl.c
M dwl.c => dwl.c +8 -0
@@ 478,6 478,10 @@ applyrules(Client *c)
			}
		}
	}
	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);
}



@@ 1733,6 1737,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);

Do not follow this link