commit 6c4c1faae4195889d35fbc104e29714d055e57e0
parent 52fb6f41b15d15b76167705f6e5a9121dd136846
Author: Natasha Kerensikova <natacha@instinctive.eu>
Date: Sun, 21 May 2023 13:43:29 +0200
[patch] dwm-togglefloatingcenter-20210806-138b405f.diff
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/dwm.c b/dwm.c
@@ -2051,6 +2051,10 @@ togglefloating(const Arg *arg)
if (selmon->sel->isfloating)
resize(selmon->sel, selmon->sel->x, selmon->sel->y,
selmon->sel->w, selmon->sel->h, 0);
+
+ selmon->sel->x = selmon->sel->mon->mx + (selmon->sel->mon->mw - WIDTH(selmon->sel)) / 2;
+ selmon->sel->y = selmon->sel->mon->my + (selmon->sel->mon->mh - HEIGHT(selmon->sel)) / 2;
+
arrange(selmon);
}