summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-05 13:29:37 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-05 13:29:37 (GMT)
commit3682b4165698b83f1604f1ce29866219b5497bd1 (patch)
treebaf340d47816f8b3150b1513320687190aaeb946
parent7ee080885fa5004ea59a49c0a81c81fd6cc9606a (diff)
downloadtk-3682b4165698b83f1604f1ce29866219b5497bd1.zip
tk-3682b4165698b83f1604f1ce29866219b5497bd1.tar.gz
tk-3682b4165698b83f1604f1ce29866219b5497bd1.tar.bz2
Don't panic for "Wild GenericEvent"'s: Just filter out all events Tk doesn't know about.
-rw-r--r--unix/tkUnixEvent.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c
index bb2eef3..1e9a98f 100644
--- a/unix/tkUnixEvent.c
+++ b/unix/tkUnixEvent.c
@@ -360,9 +360,6 @@ TransferXEventsToTcl(
int type;
XEvent x;
TkKeyEvent k;
-#ifdef GenericEvent
- XGenericEvent xge;
-#endif
} event;
Window w;
TkDisplay *dispPtr = NULL;
@@ -380,12 +377,9 @@ TransferXEventsToTcl(
while (QLength(display) > 0) {
XNextEvent(display, &event.x);
-#ifdef GenericEvent
- if (event.type == GenericEvent) {
- Tcl_Panic("Wild GenericEvent; panic! (extension=%d,evtype=%d)",
- event.xge.extension, event.xge.evtype);
+ if (event.type > MappingNotify) {
+ continue;
}
-#endif
w = None;
if (event.type == KeyPress || event.type == KeyRelease) {
for (dispPtr = TkGetDisplayList(); ; dispPtr = dispPtr->nextPtr) {