[PATCH] Menu deletion
gerard patel
gerard.patel at asi.fr
Sat May 12 06:07:51 CDT 2001
After the patch enabling destroying of menu, I have Borland C++ Builder 4 displaying more
or less randomly on the screen the selected menu item after I click it (after the popup
menu is destroyed).
ChangeLog:
* controls/menu.c
test if the menu is destroyed before displaying a menu item.
-------------- next part --------------
Index: controls/menu.c
===================================================================
RCS file: /home/wine/wine/controls/menu.c,v
retrieving revision 1.115
diff -u -r1.115 menu.c
--- controls/menu.c 2001/05/11 20:05:42 1.115
+++ controls/menu.c 2001/05/12 10:56:37
@@ -1615,7 +1615,7 @@
TRACE("owner=0x%04x menu=0x%04x index=0x%04x select=0x%04x\n", hwndOwner, hmenu, wIndex, sendMenuSelect);
lppop = MENU_GetMenu( hmenu );
- if ((!lppop) || (!lppop->nItems)) return;
+ if ((!lppop) || (!lppop->nItems) || (!lppop->hWnd)) return;
if (lppop->FocusedItem == wIndex) return;
if (lppop->wFlags & MF_POPUP) hdc = GetDC( lppop->hWnd );
@@ -3791,7 +3791,10 @@
lppop->wMagic = 0; /* Mark it as destroyed */
if ((lppop->wFlags & MF_POPUP) && lppop->hWnd)
+ {
DestroyWindow( lppop->hWnd );
+ lppop->hWnd = 0;
+ }
if (lppop->items) /* recursively destroy submenus */
{
-------------- next part --------------
More information about the wine-patches
mailing list