aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarrick Lo <warrick.s.z.lo@gmail.com>2021-11-24 03:23:59 -0800
committerWarrick Lo <warrick.s.z.lo@gmail.com>2021-11-24 03:23:59 -0800
commitad7c5938d25936c1e7ddcb8b46ec57039bd5cf0a (patch)
tree7c12c7ad8226f9963e10d3f9ed99d4ee7c3a56e3
parentWindow focus now only switches on click (diff)
Always center floating windows
-rw-r--r--dwm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index 4aa21e2..0c9cb30 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1208,6 +1208,8 @@ manage(Window w, XWindowAttributes *wa)
updatesizehints(c);
updatewmhints(c);
updatemotifhints(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)