summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-10-07 05:09:26 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-10-07 05:09:26 +0530
commit573b9452a0b9df149286ca50f11b136643506971 (patch)
treefee6ba7464c35044eccd4334382a574068b169b2 /dwm.c
parentb92004905e25206522980b7e0db192f83e104969 (diff)
Applied alwayscenter 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 2a2bee5..df8d976 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1205,6 +1205,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)