XEvent ev;
ocx = nx = c->x;
- ocy = ny = c->y;
+ ocy = ny = c->y;
if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
None, cursor[CurMove], CurrentTime) != GrabSuccess)
return;
c->h = ev->height;
if((ev->value_mask & (CWX | CWY))
&& !(ev->value_mask & (CWWidth | CWHeight)))
+ {
configure(c);
- resize(c, c->x, c->y, c->w, c->h, False);
- if(!isvisible(c))
- ban(c);
+ if(isvisible(c))
+ XMoveWindow(dpy, c->win, c->x, c->y);
+ }
+ else {
+ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
+ if(!isvisible(c))
+ ban(c);
+ }
}
else
configure(c);