From 48d530ee6fa7562b2c00f16e84e5b273b03f08ab Mon Sep 17 00:00:00 2001 From: okan Date: Sat, 19 Oct 2013 18:59:22 +0000 Subject: I believe we redraw the border in too many cases; likely a leftover from the cc->pwin days - don't redraw on every unhide, resize, and mouse move/resize Expose event (note, all Expose events trigger a redraw anyway). Tested with some finicky X apps I could think of, though I'm sure others will find more - if so, and they 'lose' the border, please report! --- mousefunc.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'mousefunc.c') diff --git a/mousefunc.c b/mousefunc.c index 12a0f81..b1fe7cf 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: mousefunc.c,v 1.56 2013/07/09 01:24:49 okan Exp $ + * $OpenBSD: mousefunc.c,v 1.57 2013/10/19 18:59:22 okan Exp $ */ #include @@ -88,12 +88,9 @@ mousefunc_client_resize(struct client_ctx *cc, void *arg) mousefunc_sweep_draw(cc); for (;;) { - XMaskEvent(X_Dpy, MOUSEMASK|ExposureMask, &ev); + XMaskEvent(X_Dpy, MOUSEMASK, &ev); switch (ev.type) { - case Expose: - client_draw_border(cc); - break; case MotionNotify: mousefunc_sweep_calc(cc, x, y, ev.xmotion.x_root, ev.xmotion.y_root); @@ -143,12 +140,9 @@ mousefunc_client_move(struct client_ctx *cc, void *arg) xu_ptr_getpos(cc->win, &px, &py); for (;;) { - XMaskEvent(X_Dpy, MOUSEMASK|ExposureMask, &ev); + XMaskEvent(X_Dpy, MOUSEMASK, &ev); switch (ev.type) { - case Expose: - client_draw_border(cc); - break; case MotionNotify: cc->geom.x = ev.xmotion.x_root - px - cc->bwidth; cc->geom.y = ev.xmotion.y_root - py - cc->bwidth; -- cgit v1.2.3-2-gb3c3