diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2007-06-05 18:57:04 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2007-06-05 18:57:04 +0000 |
commit | 9c3699e14b3a5a9d6a94baca638eeb45834064a4 (patch) | |
tree | cd3401071a50e0a4870f9b8de96abb591a4a13a9 /app/cwm/grab.c | |
parent | 515fec914744e1db2faa91e1d437206407a53b2d (diff) |
draw window borders when redrawing a window
from aon@iki.fi
Diffstat (limited to 'app/cwm/grab.c')
-rw-r--r-- | app/cwm/grab.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/cwm/grab.c b/app/cwm/grab.c index 90d4c84bf..9946497d4 100644 --- a/app/cwm/grab.c +++ b/app/cwm/grab.c @@ -4,7 +4,7 @@ * Copyright (c) 2004 Marius Aamodt Eriksen <marius@monkey.org> * All rights reserved. * - * $Id: grab.c,v 1.4 2007/05/28 18:34:27 jasper Exp $ + * $Id: grab.c,v 1.5 2007/06/05 18:57:03 jasper Exp $ */ #include "headers.h" @@ -64,9 +64,12 @@ grab_sweep(struct client_ctx *cc) for (;;) { /* Look for changes in ptr position. */ - XMaskEvent(X_Dpy, MouseMask, &ev); + XMaskEvent(X_Dpy, MouseMask|ExposureMask, &ev); switch (ev.type) { + case Expose: + client_draw_border(cc); + break; case MotionNotify: if (_sweepcalc(cc, x0, y0, ev.xmotion.x, ev.xmotion.y)) /* Recompute window output */ @@ -108,9 +111,12 @@ grab_drag(struct client_ctx *cc) xu_ptr_getpos(sc->rootwin, &xm, &ym); for (;;) { - XMaskEvent(X_Dpy, MouseMask, &ev); + XMaskEvent(X_Dpy, MouseMask|ExposureMask, &ev); switch (ev.type) { + case Expose: + client_draw_border(cc); + break; case MotionNotify: cc->geom.x = x0 + (ev.xmotion.x - xm); cc->geom.y = y0 + (ev.xmotion.y - ym); |