From e77420541ab3dac3d494d293fbc975379474b20b Mon Sep 17 00:00:00 2001 From: Jackson Taylor Date: Tue, 30 Jun 2020 23:58:33 +0000 Subject: Add always centered patch --- dwm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index a96f33c1..c242b2c0 100644 --- a/dwm.c +++ b/dwm.c @@ -1060,6 +1060,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) -- cgit v1.2.3