mirror of
https://github.com/reactos/reactos.git
synced 2024-07-11 07:05:12 +00:00
[Win32SS]
- HAX: Fix menu test crash! - Contract be damned. This number 2 on my list to move server side! svn path=/trunk/; revision=57251
This commit is contained in:
parent
4dc4dad0b3
commit
64823b2694
|
@ -1814,14 +1814,29 @@ NtUserGetMenuBarInfo(
|
||||||
}
|
}
|
||||||
if (MenuObject->MenuInfo.FocusedItem != NO_SELECTED_ITEM)
|
if (MenuObject->MenuInfo.FocusedItem != NO_SELECTED_ITEM)
|
||||||
kmbi.fBarFocused = TRUE;
|
kmbi.fBarFocused = TRUE;
|
||||||
|
|
||||||
|
if (MenuObject->MenuItemList)
|
||||||
|
{
|
||||||
SubMenuObject = UserGetMenuObject(MenuObject->MenuItemList->hSubMenu);
|
SubMenuObject = UserGetMenuObject(MenuObject->MenuItemList->hSubMenu);
|
||||||
if(SubMenuObject) kmbi.hwndMenu = SubMenuObject->MenuInfo.Wnd;
|
if(SubMenuObject) kmbi.hwndMenu = SubMenuObject->MenuInfo.Wnd;
|
||||||
|
}
|
||||||
TRACE("OBJID_MENU, idItem = %d\n",idItem);
|
TRACE("OBJID_MENU, idItem = %d\n",idItem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OBJID_CLIENT:
|
case OBJID_CLIENT:
|
||||||
{
|
{
|
||||||
PMENU_OBJECT SubMenuObject, XSubMenuObject;
|
PMENU_OBJECT SubMenuObject, XSubMenuObject;
|
||||||
|
HMENU hMenuChk;
|
||||||
|
// Windows does this! Wine checks for Atom and uses GetWindowLongPtrW.
|
||||||
|
hMenuChk = (HMENU)co_IntSendMessage(hwnd, MN_GETHMENU, 0, 0);
|
||||||
|
|
||||||
|
if (!(MenuObject = UserGetMenuObject(hMenuChk)))
|
||||||
|
{
|
||||||
|
ERR("Window does not have a Popup Menu!\n");
|
||||||
|
EngSetLastError(ERROR_INVALID_MENU_HANDLE);
|
||||||
|
RETURN(FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
SubMenuObject = UserGetMenuObject(MenuObject->MenuItemList->hSubMenu);
|
SubMenuObject = UserGetMenuObject(MenuObject->MenuItemList->hSubMenu);
|
||||||
if(SubMenuObject) kmbi.hMenu = SubMenuObject->MenuInfo.Self;
|
if(SubMenuObject) kmbi.hMenu = SubMenuObject->MenuInfo.Self;
|
||||||
else
|
else
|
||||||
|
|
|
@ -302,7 +302,7 @@
|
||||||
@ stdcall GetLayeredWindowAttributes(long ptr ptr ptr) NtUserGetLayeredWindowAttributes
|
@ stdcall GetLayeredWindowAttributes(long ptr ptr ptr) NtUserGetLayeredWindowAttributes
|
||||||
@ stdcall GetListBoxInfo(long) NtUserGetListBoxInfo
|
@ stdcall GetListBoxInfo(long) NtUserGetListBoxInfo
|
||||||
@ stdcall GetMenu(long)
|
@ stdcall GetMenu(long)
|
||||||
@ stdcall GetMenuBarInfo(long long long ptr) NtUserGetMenuBarInfo
|
@ stdcall GetMenuBarInfo(long long long ptr) ; tempo haxzo NtUserGetMenuBarInfo
|
||||||
@ stdcall GetMenuCheckMarkDimensions()
|
@ stdcall GetMenuCheckMarkDimensions()
|
||||||
@ stdcall GetMenuContextHelpId(long)
|
@ stdcall GetMenuContextHelpId(long)
|
||||||
@ stdcall GetMenuDefaultItem(long long long)
|
@ stdcall GetMenuDefaultItem(long long long)
|
||||||
|
|
|
@ -4216,6 +4216,26 @@ GetMenu(HWND hWnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOL WINAPI GetMenuBarInfo( HWND hwnd, LONG idObject, LONG idItem, PMENUBARINFO pmbi )
|
||||||
|
{
|
||||||
|
BOOL Ret;
|
||||||
|
Ret = NtUserGetMenuBarInfo( hwnd, idObject, idItem, pmbi);
|
||||||
|
// Reason to move to server side!!!!!
|
||||||
|
if (!Ret) return Ret;
|
||||||
|
// EL HAXZO!!!
|
||||||
|
pmbi->fBarFocused = top_popup_hmenu == pmbi->hMenu;
|
||||||
|
if (!idItem)
|
||||||
|
{
|
||||||
|
pmbi->fFocused = pmbi->fBarFocused;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue