Reset top_popup to fix MENU_IsMenuActive
Zach Gorman
zach at archetypeauction.com
Sun Jul 18 22:31:13 CDT 2004
Changelog: Set the top_popup global variable to zero in MENU_ExitTracking(),
fixing MENU_IsMenuActive() and therefore VK_F1 WM_HELP message generation.
This patch resolves a problem I was having in which F1 popup (aka "What's
This") help stopped working after any menu had been pulled down.
Windows/message.c contains code that generates a WM_HELP message in response
to the F1 key being pressed. WM_HELP generation is conditional on a call to
MENU_IsMenuActive(). MENU_IsMenuActive has a bug, however, in which it
returns true any time a menu has *ever* been pulled down - not just when a
menu is currently pulled down. This bug, in turn, is caused by the fact that
the global variable top_popup is not set to zero after menu tracking is
complete. The proposed patch sets top_popup to zero in MENU_ExitTracking.
Zach Gorman
zach at ArchetypeAuction.com
Index: menu.c
===================================================================
RCS file: /home/wine/wine/controls/menu.c,v
retrieving revision 1.183
diff -u -r1.183 menu.c
--- menu.c 18 Jun 2004 19:31:57 -0000 1.183
+++ menu.c 19 Jul 2004 02:55:18 -0000
@@ -2869,6 +2869,7 @@
SendMessageW( hWnd, WM_EXITMENULOOP, 0, 0 );
ShowCaret(0);
+ top_popup = 0;
return TRUE;
}
More information about the wine-patches
mailing list