user32: Always release menu item in EnableMenuItem.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
15215bd071
commit
aee9fa0e55
|
@ -3741,9 +3741,7 @@ BOOL WINAPI EnableMenuItem( HMENU hMenu, UINT id, UINT wFlags )
|
||||||
item->fState ^= (oldflags ^ wFlags) & (MF_GRAYED | MF_DISABLED);
|
item->fState ^= (oldflags ^ wFlags) & (MF_GRAYED | MF_DISABLED);
|
||||||
|
|
||||||
/* If the close item in the system menu change update the close button */
|
/* If the close item in the system menu change update the close button */
|
||||||
if ((item->wID == SC_CLOSE) && (oldflags != wFlags))
|
if ((item->wID == SC_CLOSE) && (oldflags != wFlags) && menu->hSysMenuOwner)
|
||||||
{
|
|
||||||
if (menu->hSysMenuOwner)
|
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT rc;
|
||||||
POPUPMENU* parentMenu;
|
POPUPMENU* parentMenu;
|
||||||
|
@ -3763,7 +3761,6 @@ BOOL WINAPI EnableMenuItem( HMENU hMenu, UINT id, UINT wFlags )
|
||||||
rc.bottom = 0;
|
rc.bottom = 0;
|
||||||
RedrawWindow(hwnd, &rc, 0, RDW_FRAME | RDW_INVALIDATE | RDW_NOCHILDREN);
|
RedrawWindow(hwnd, &rc, 0, RDW_FRAME | RDW_INVALIDATE | RDW_NOCHILDREN);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
release_menu_ptr(menu);
|
release_menu_ptr(menu);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue