From 6f241273b58643396fd052027c8cde6f815376c8 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Tue, 16 Jan 2024 18:14:50 +0100 Subject: [PATCH] center floating windows --- dwl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dwl.c b/dwl.c index f25ac2f..9058ce2 100644 --- a/dwl.c +++ b/dwl.c @@ -450,6 +450,8 @@ applyrules(Client *c) } } } + 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; wlr_scene_node_reparent(&c->scene->node, layers[c->isfloating ? LyrFloat : LyrTile]); setmon(c, mon, newtags); } -- 2.43.0