summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-01-09 21:56:16 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-01-09 21:56:16 (GMT)
commit8d65c105a16c35b35a3832d815661e923c43bd80 (patch)
tree352d681f0771cf213c75bd5f0b289532bfb757ca
parent2aa8148b1c0d4bfd43195800910c9c6eec0ec8a2 (diff)
parent16a463a4eb33a7d69b47b2b4ae6203876db04b09 (diff)
downloadtk-8d65c105a16c35b35a3832d815661e923c43bd80.zip
tk-8d65c105a16c35b35a3832d815661e923c43bd80.tar.gz
tk-8d65c105a16c35b35a3832d815661e923c43bd80.tar.bz2
Fix [7a838c38a1]: X11 bind event ring buffer and NoExpose event. Patch from Christian Werner.
-rw-r--r--generic/tkBind.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index d3fdc96..567c51f 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -1260,6 +1260,16 @@ Tk_BindEvent(
}
}
+ /*
+ * 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]) {
+ return;
+ }
+
dispPtr = ((TkWindow *) tkwin)->dispPtr;
bindInfoPtr = winPtr->mainPtr->bindInfo;