summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorJackson Taylor <jtaylormuffins@gmail.com>2020-06-30 23:58:33 +0000
committerJackson Taylor <jtaylor@classicalconversations.com>2022-02-07 10:19:29 -0500
commite77420541ab3dac3d494d293fbc975379474b20b (patch)
tree7be38df52d92c88522362f08efa12a0975c61226 /dwm.c
parent3c0497b6be06211932e50bf435baa05a19342bf5 (diff)
Add always centered patch
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c2
1 files changed, 2 insertions, 0 deletions
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)