fixed configurerequest according to Jukkas complains
This commit is contained in:
parent
3167373512
commit
b61f91361c
17
event.c
17
event.c
@ -165,7 +165,6 @@ buttonpress(XEvent *e) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
configurerequest(XEvent *e) {
|
configurerequest(XEvent *e) {
|
||||||
int x, y, w, h;
|
|
||||||
Client *c;
|
Client *c;
|
||||||
XConfigureRequestEvent *ev = &e->xconfigurerequest;
|
XConfigureRequestEvent *ev = &e->xconfigurerequest;
|
||||||
XWindowChanges wc;
|
XWindowChanges wc;
|
||||||
@ -175,21 +174,23 @@ configurerequest(XEvent *e) {
|
|||||||
if(ev->value_mask & CWBorderWidth)
|
if(ev->value_mask & CWBorderWidth)
|
||||||
c->border = ev->border_width;
|
c->border = ev->border_width;
|
||||||
if(c->isfixed || c->isfloat || (arrange == dofloat)) {
|
if(c->isfixed || c->isfloat || (arrange == dofloat)) {
|
||||||
x = (ev->value_mask & CWX) ? ev->x : c->x;
|
if(ev->value_mask & CWX)
|
||||||
y = (ev->value_mask & CWY) ? ev->y : c->y;
|
c->x = ev->x;
|
||||||
w = (ev->value_mask & CWWidth) ? ev->width : c->w;
|
if(ev->value_mask & CWY)
|
||||||
h = (ev->value_mask & CWHeight) ? ev->height : c->h;
|
c->y = ev->y;
|
||||||
|
if(ev->value_mask & CWWidth)
|
||||||
|
c->w = ev->width;
|
||||||
|
if(ev->value_mask & CWHeight)
|
||||||
|
c->h = ev->height;
|
||||||
if((ev->value_mask & (CWX | CWY))
|
if((ev->value_mask & (CWX | CWY))
|
||||||
&& !(ev->value_mask & (CWWidth | CWHeight)))
|
&& !(ev->value_mask & (CWWidth | CWHeight)))
|
||||||
{
|
{
|
||||||
c->x = x;
|
|
||||||
c->y = y;
|
|
||||||
configure(c);
|
configure(c);
|
||||||
if(isvisible(c))
|
if(isvisible(c))
|
||||||
XMoveWindow(dpy, c->win, c->x, c->y);
|
XMoveWindow(dpy, c->win, c->x, c->y);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
resize(c, x, y, w, h, False);
|
XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
|
||||||
if(!isvisible(c))
|
if(!isvisible(c))
|
||||||
ban(c);
|
ban(c);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user