fix: center floating doesn't work because values are set after
This commit is contained in:
parent
8e6580e072
commit
d3a1dcb917
11
speedwm.c
11
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);
|
||||
|
|
Loading…
Reference in a new issue