popDownMenu: reset insideMenu and highlightedItem to prevent stale state on reopen
This commit is contained in:
parent
230eefd8d3
commit
6b5b015cd8
|
|
@ -516,6 +516,13 @@ static void popUpMenu(PopUpButton * bPtr)
|
|||
static void popDownMenu(PopUpButton * bPtr)
|
||||
{
|
||||
W_UnmapView(bPtr->menuView);
|
||||
/* Clear interactive state so the next open starts from a clean
|
||||
* slate. insideMenu and highlightedItem must be reset here;
|
||||
* relying on WME_LEAVE from the NULL/1x1 unmap is unreliable.
|
||||
* Stale highlightedItem causes the next BUTTON_RELEASE to
|
||||
* immediately close the popup. */
|
||||
bPtr->flags.insideMenu = 0;
|
||||
bPtr->highlightedItem = -1;
|
||||
}
|
||||
|
||||
static void autoScroll(void *data)
|
||||
|
|
|
|||
Loading…
Reference in New Issue