fix: center floating doesn't work because values are set after

This commit is contained in:
speedie 2022-11-11 23:06:32 +01:00
parent 8e6580e072
commit d3a1dcb917

View file

@ -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);