diff --git a/speedwm.c b/speedwm.c index c384902..c0a53c5 100644 --- a/speedwm.c +++ b/speedwm.c @@ -3703,6 +3703,11 @@ manage(Window w, XWindowAttributes *wa) } setclienttagprop(c); + if (centerfloating) { + c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2; + c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2; + } + if (savefloat) { c->sfx = c->x; @@ -3711,12 +3716,6 @@ manage(Window w, XWindowAttributes *wa) c->sfh = c->h; } - if (centerfloating) - { - c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2; - c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2; - } - updatemotifhints(c); XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); grabbuttons(c, 0);