fixed configurerequest according to the problem Jukka reported

master
Anselm R. Garbe 2007-02-19 11:03:27 +01:00
parent 4cff744438
commit 3167373512
1 changed files with 16 additions and 11 deletions

27
event.c
View File

@ -165,6 +165,7 @@ 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;
@ -174,20 +175,24 @@ 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)) {
if(ev->value_mask & CWX) x = (ev->value_mask & CWX) ? ev->x : c->x;
c->x = ev->x; y = (ev->value_mask & CWY) ? ev->y : c->y;
if(ev->value_mask & CWY) w = (ev->value_mask & CWWidth) ? ev->width : c->w;
c->y = ev->y; h = (ev->value_mask & CWHeight) ? ev->height : c->h;
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);
resize(c, c->x, c->y, c->w, c->h, False); if(isvisible(c))
if(!isvisible(c)) XMoveWindow(dpy, c->win, c->x, c->y);
ban(c); }
else {
resize(c, x, y, w, h, False);
if(!isvisible(c))
ban(c);
}
} }
else else
configure(c); configure(c);