From 203f90bfb2d8146b61882310017a6a4fe3f13849 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 12 Mar 2021 12:55:44 -0500 Subject: [PATCH] always center --- dwm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dwm.c b/dwm.c index 93d2423..929f878 100644 --- a/dwm.c +++ b/dwm.c @@ -1229,6 +1229,8 @@ manage(Window w, XWindowAttributes *wa) updatewindowtype(c); updatesizehints(c); updatewmhints(c); + c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2; + c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2; XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); grabbuttons(c, 0); if (!c->isfloating)