diff --git a/grab.c b/grab.c index ad16a9d..860e6ec 100644 --- a/grab.c +++ b/grab.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1994-1996 David Hogan, see README for licence details */ +./* Copyright (c) 1994-1996 David Hogan, see README for licence details */ #include #include #include @@ -555,6 +555,9 @@ void misleep(int msec) { select(0, 0, 0, 0, &t); } +/* Not grabbing the server during sweep ops might make Xorg unstable. + -drkste */ + int sweepdrag( Client* c, int but, XButtonEvent* e0, BorderOrient bl, int (*recalc)(Client*, int, int, BorderOrient, int)) { @@ -578,7 +581,7 @@ int sweepdrag( getmouse(&cx, &cy, c->screen); else getmouse(&c->x, &c->y, c->screen); - XGrabServer(dpy); + //XGrabServer(dpy); if (bl != BorderUnknown) { notmoved = recalc(c, cx, cy, bl, notmoved); } @@ -588,12 +591,12 @@ int sweepdrag( if (XCheckMaskEvent(dpy, ButtonMask, &ev) == 0) { getmouse(&rx, &ry, c->screen); if (rx != cx || ry != cy || ++idle > 300) { - drawbound(c, 0); + drawbound(c, 1); if (rx == cx && ry == cy) { - XUngrabServer(dpy); + //XUngrabServer(dpy); XFlush(dpy); - misleep(500); - XGrabServer(dpy); + //misleep(500); + //XGrabServer(dpy); idle = 0; } if (e0 || bl != BorderUnknown) @@ -614,7 +617,7 @@ int sweepdrag( case ButtonRelease: drawbound(c, 0); ungrab(e); - XUngrabServer(dpy); + //XUngrabServer(dpy); if (e->button != but && c->init) goto bad; if (c->dx < 0) {