diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkBind.c | 5 | ||||
-rw-r--r-- | generic/tkEvent.c | 21 |
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; } |