From 8313aaf2d2c39dd94d04766a10a0207c682790e2 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sat, 7 Jan 2017 15:49:04 +0000 Subject: Patch from chw for [7a838c38a1]: X11 bind event ring buffer and GraphicsExpose/NoExpose --- generic/tkBind.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/generic/tkBind.c b/generic/tkBind.c index d3fdc96..525e13e 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -1260,6 +1260,16 @@ Tk_BindEvent( } } + /* + * Ignore event types which are not in flagArray. Most notably, + * NoExpose events can fill the ring buffer and disturb (thus + * masking out) event sequences of interest. + */ + + if ((eventPtr->type >= TK_LASTEVENT) || !flagArray[eventPtr->type]) { + return; + } + dispPtr = ((TkWindow *) tkwin)->dispPtr; bindInfoPtr = winPtr->mainPtr->bindInfo; -- cgit v0.12 From 16a463a4eb33a7d69b47b2b4ae6203876db04b09 Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 9 Jan 2017 13:42:46 +0000 Subject: Better comment explaining why some events are ignored. --- generic/tkBind.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tkBind.c b/generic/tkBind.c index 525e13e..567c51f 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -1261,9 +1261,9 @@ Tk_BindEvent( } /* - * Ignore event types which are not in flagArray. Most notably, - * NoExpose events can fill the ring buffer and disturb (thus - * masking out) event sequences of interest. + * Ignore event types which are not in flagArray and all zeroes there. + * Most notably, NoExpose events can fill the ring buffer and disturb + * (thus masking out) event sequences of interest. */ if ((eventPtr->type >= TK_LASTEVENT) || !flagArray[eventPtr->type]) { -- cgit v0.12