user32: Remove redundant system menu handle checks.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
83ed0a636b
commit
ac2b288b27
@ -298,10 +298,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
|
|||||||
{
|
{
|
||||||
LONG hitcode;
|
LONG hitcode;
|
||||||
POINT pt;
|
POINT pt;
|
||||||
WND *wndPtr = WIN_GetPtr( hwnd );
|
|
||||||
HMENU hMenu = wndPtr->hSysMenu;
|
|
||||||
WIN_ReleasePtr( wndPtr );
|
|
||||||
if (!hMenu) return 0;
|
|
||||||
pt.x = (short)LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = (short)HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
hitcode = NC_HandleNCHitTest(hwnd, pt);
|
hitcode = NC_HandleNCHitTest(hwnd, pt);
|
||||||
@ -315,16 +311,11 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_POPUPSYSTEMMENU:
|
case WM_POPUPSYSTEMMENU:
|
||||||
{
|
|
||||||
/* This is an undocumented message used by the windows taskbar to
|
/* This is an undocumented message used by the windows taskbar to
|
||||||
display the system menu of windows that belong to other processes. */
|
display the system menu of windows that belong to other processes. */
|
||||||
HMENU menu = GetSystemMenu(hwnd, FALSE);
|
TrackPopupMenu( GetSystemMenu(hwnd, FALSE), TPM_LEFTBUTTON|TPM_RIGHTBUTTON,
|
||||||
|
(short)LOWORD(lParam), (short)HIWORD(lParam), 0, hwnd, NULL );
|
||||||
if (menu)
|
|
||||||
TrackPopupMenu(menu, TPM_LEFTBUTTON|TPM_RIGHTBUTTON,
|
|
||||||
LOWORD(lParam), HIWORD(lParam), 0, hwnd, NULL);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
case WM_NCACTIVATE:
|
case WM_NCACTIVATE:
|
||||||
return NC_HandleNCActivate( hwnd, wParam, lParam );
|
return NC_HandleNCActivate( hwnd, wParam, lParam );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user