commit 32829e602eb850db5d079d9cc50dc36706700d97
parent 4be8f355c7b5753d5b7e1608402966ed8e755cb2
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
@@ -2052,6 +2052,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);
}