summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-01-26 17:25:34 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2024-01-26 17:25:34 -0500
commit629f5e4bf22a7046ea9b849bc06377ff8154b624 (patch)
tree7aaa3beafd139c4b0b5ff5fa707abd2dfbb66920
parentecbd6f8a626f84737d279d440aff69f19bf309c0 (diff)
Implement alwayscentered-floating
-rw-r--r--dwm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index 9333497..fd81e28 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1138,6 +1138,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)