Alexandre Julliard : user32: Remove redundant system menu handle checks.
Alexandre Julliard
julliard at winehq.org
Wed Jun 8 11:07:35 CDT 2016
Module: wine
Branch: master
Commit: ac2b288b27f5aed3c426528e8b3e77b0766958cc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ac2b288b27f5aed3c426528e8b3e77b0766958cc
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Jun 8 16:12:46 2016 +0900
user32: Remove redundant system menu handle checks.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/defwnd.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c
index 68d9480..244e544 100644
--- a/dlls/user32/defwnd.c
+++ b/dlls/user32/defwnd.c
@@ -298,10 +298,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
{
LONG hitcode;
POINT pt;
- WND *wndPtr = WIN_GetPtr( hwnd );
- HMENU hMenu = wndPtr->hSysMenu;
- WIN_ReleasePtr( wndPtr );
- if (!hMenu) return 0;
pt.x = (short)LOWORD(lParam);
pt.y = (short)HIWORD(lParam);
hitcode = NC_HandleNCHitTest(hwnd, pt);
@@ -315,16 +311,11 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
break;
case WM_POPUPSYSTEMMENU:
- {
- /* This is an undocumented message used by the windows taskbar to
- display the system menu of windows that belong to other processes. */
- HMENU menu = GetSystemMenu(hwnd, FALSE);
-
- if (menu)
- TrackPopupMenu(menu, TPM_LEFTBUTTON|TPM_RIGHTBUTTON,
- LOWORD(lParam), HIWORD(lParam), 0, hwnd, NULL);
- return 0;
- }
+ /* This is an undocumented message used by the windows taskbar to
+ display the system menu of windows that belong to other processes. */
+ TrackPopupMenu( GetSystemMenu(hwnd, FALSE), TPM_LEFTBUTTON|TPM_RIGHTBUTTON,
+ (short)LOWORD(lParam), (short)HIWORD(lParam), 0, hwnd, NULL );
+ return 0;
case WM_NCACTIVATE:
return NC_HandleNCActivate( hwnd, wParam, lParam );
More information about the wine-cvs
mailing list