summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-03 14:44:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-03 14:44:56 (GMT)
commitf642266b9014715980f4b4fa6d975489ea5a5b35 (patch)
treeee50a03cce2ae60155966e2b132ea33b8357793b /generic
parenta130dc0b53b019d3ad917358bdbb623b8699ca2b (diff)
parentecf9bf902a602cb8b1d455ba8438c1d4b35b4a04 (diff)
downloadtk-f642266b9014715980f4b4fa6d975489ea5a5b35.zip
tk-f642266b9014715980f4b4fa6d975489ea5a5b35.tar.gz
tk-f642266b9014715980f4b4fa6d975489ea5a5b35.tar.bz2
Merge 8.6
Diffstat (limited to 'generic')
-rw-r--r--generic/tkBind.c5
-rw-r--r--generic/tkEvent.c21
2 files changed, 7 insertions, 19 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index ed81584..46c1e78 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -1154,13 +1154,13 @@ ClearLookupTable(
if (key->object != object) {
continue;
}
- Tcl_DeleteHashEntry(hPtr);
}
psList = Tcl_GetHashValue(hPtr);
PSList_Move(pool, psList);
ckfree(psList);
DEBUG(countListItems -= 1;)
+ Tcl_DeleteHashEntry(hPtr);
}
}
@@ -3456,9 +3456,10 @@ DeleteVirtualEventTable(
ckfree(Tcl_GetHashValue(hPtr));
}
Tcl_DeleteHashTable(&vetPtr->nameTable);
- Tcl_DeleteHashTable(&vetPtr->lookupTables.listTable);
ClearLookupTable(&vetPtr->lookupTables, NULL);
+ Tcl_DeleteHashTable(&vetPtr->lookupTables.listTable);
+
DEBUG(countEntryItems -= PSList_Size(&vetPtr->lookupTables.entryPool);)
PSList_Traverse(&vetPtr->lookupTables.entryPool, FreePatSeqEntry);
}
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index ef6393a..0782d7a 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -73,7 +73,7 @@ typedef struct TkWindowEvent {
* Array of event masks corresponding to each X event:
*/
-static const unsigned long realEventMasks[MappingNotify+1] = {
+static const unsigned long eventMasks[TK_LASTEVENT] = {
0,
0,
KeyPressMask, /* KeyPress */
@@ -111,10 +111,7 @@ static const unsigned long realEventMasks[MappingNotify+1] = {
0, /* SelectionNotify */
ColormapChangeMask, /* ColormapNotify */
0, /* ClientMessage */
- 0 /* Mapping Notify */
-};
-
-static const unsigned long virtualEventMasks[TK_LASTEVENT-VirtualEvent] = {
+ 0, /* Mapping Notify */
VirtualEventMask, /* VirtualEvents */
ActivateMask, /* ActivateNotify */
ActivateMask, /* DeactivateNotify */
@@ -448,18 +445,8 @@ GetEventMaskFromXEvent(
{
unsigned long mask;
- /*
- * Get the event mask from the correct table. Note that there are two
- * tables here because that means we no longer need this code to rely on
- * the exact value of VirtualEvent, which has caused us problems in the
- * past when X11 changed the value of LASTEvent. [Bug ???]
- */
-
- if (eventPtr->xany.type <= MappingNotify) {
- mask = realEventMasks[eventPtr->xany.type];
- } else if (eventPtr->xany.type >= VirtualEvent
- && eventPtr->xany.type<TK_LASTEVENT) {
- mask = virtualEventMasks[eventPtr->xany.type - VirtualEvent];
+ if (eventPtr->xany.type <TK_LASTEVENT) {
+ mask = eventMasks[eventPtr->xany.type];
} else {
mask = 0;
}