summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-01-09 21:56:36 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-01-09 21:56:36 (GMT)
commit8f85d6a0fc17e5a781ab64e70991134b9009a274 (patch)
tree0c4c3f9b0f5016c22b56f66d208a1263936a743d /generic
parent855e33530a514c6bdd7b663c86d4384c19ccdf2d (diff)
parent8d65c105a16c35b35a3832d815661e923c43bd80 (diff)
downloadtk-8f85d6a0fc17e5a781ab64e70991134b9009a274.zip
tk-8f85d6a0fc17e5a781ab64e70991134b9009a274.tar.gz
tk-8f85d6a0fc17e5a781ab64e70991134b9009a274.tar.bz2
Fix [7a838c38a1]: X11 bind event ring buffer and NoExpose event. Patch from Christian Werner.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkBind.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index bb95fa9..8a6fc56 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;