diff options
author | gcramer <remarcg@gmx.net> | 2018-12-30 15:04:44 (GMT) |
---|---|---|
committer | gcramer <remarcg@gmx.net> | 2018-12-30 15:04:44 (GMT) |
commit | 712e884108b8e073fb277339a02fb31114787963 (patch) | |
tree | 8c3b2364537679a4d0144ab93cf77bc32874d219 /generic/tkBind.c | |
parent | 613064c1701e2fd20ff4be51dc3571daecf22691 (diff) | |
download | tk-712e884108b8e073fb277339a02fb31114787963.zip tk-712e884108b8e073fb277339a02fb31114787963.tar.gz tk-712e884108b8e073fb277339a02fb31114787963.tar.bz2 |
Fix in TkpBindDeadWindow: now promotion lists will be updated, this will hopefully fix the Windows problem with test case bind-15.23.
Diffstat (limited to 'generic/tkBind.c')
-rw-r--r-- | generic/tkBind.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c index 2aec629..3fade17 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -1389,6 +1389,9 @@ TkpBindDeadWindow( BindingTable *bindPtr; Event *curEvent; Window window; + LookupTables *lookupTables; + unsigned newArraySize; + unsigned i; assert(winPtr); @@ -1417,6 +1420,28 @@ TkpBindDeadWindow( bindPtr->eventInfo[KeyRelease].countAny = 0; bindPtr->eventInfo[KeyRelease].countDetailed = 0; } + + lookupTables = &bindPtr->lookupTables; + + for (i = newArraySize = 0; i < PromArr_Size(bindPtr->promArr); ++i) { + PSList *psList = PromArr_Get(bindPtr->promArr, i); + PSEntry *psEntry; + PSEntry *psNext; + + for (psEntry = PSList_First(psList); psEntry; psEntry = psNext) { + psNext = PSList_Next(psEntry); + + if (psEntry->window == window) { + RemoveListEntry(&lookupTables->entryPool, psEntry); + } + } + + if (!PSList_IsEmpty(psList)) { + newArraySize = i + 1; + } + } + + PromArr_SetSize(bindPtr->promArr, newArraySize); } /* |