From 5a96a47d708e94f1789daed2c1342279aa930d2f Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Sat, 1 Jun 2024 23:46:06 +0200 Subject: [PATCH] center floating windows --- dwl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dwl.c b/dwl.c index 52bfbc8..c912b04 100644 --- a/dwl.c +++ b/dwl.c @@ -1618,6 +1618,10 @@ mapnotify(struct wl_listener *listener, void *data) } else { applyrules(c); } + if (c->mon) { + c->geom.x = (c->mon->w.width - c->geom.width) / 2 + c->mon->m.x; + c->geom.y = (c->mon->w.height - c->geom.height) / 2 + c->mon->m.y; + } printstatus(); unset_fullscreen: -- 2.45.1