Hugh McMaster : regedit: Only show the context menu if the mouse is over a treeitem.
Alexandre Julliard
julliard at winehq.org
Thu Apr 20 16:41:34 CDT 2017
Module: wine
Branch: master
Commit: 6f667d1c428bf2589eab4b177d6b1a798cc4a102
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6f667d1c428bf2589eab4b177d6b1a798cc4a102
Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date: Mon Apr 17 09:15:46 2017 +0000
regedit: Only show the context menu if the mouse is over a treeitem.
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/regedit/childwnd.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/programs/regedit/childwnd.c b/programs/regedit/childwnd.c
index df7c640..6ee0cdb 100644
--- a/programs/regedit/childwnd.c
+++ b/programs/regedit/childwnd.c
@@ -376,10 +376,11 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
TVHITTESTINFO ht;
ht.pt = pt;
ScreenToClient(g_pChildWnd->hTreeWnd, &ht.pt);
- if (SendMessageW(g_pChildWnd->hTreeWnd, TVM_HITTEST, 0, (LPARAM)&ht))
+ if (SendMessageW(g_pChildWnd->hTreeWnd, TVM_HITTEST, 0, (LPARAM)&ht)) {
SendMessageW(g_pChildWnd->hTreeWnd, TVM_SELECTITEM, TVGN_CARET, (LPARAM)ht.hItem);
- TrackPopupMenu(GetSubMenu(hPopupMenus, PM_NEW), TPM_RIGHTBUTTON,
- pt.x, pt.y, 0, hFrameWnd, NULL);
+ TrackPopupMenu(GetSubMenu(hPopupMenus, PM_NEW), TPM_RIGHTBUTTON,
+ pt.x, pt.y, 0, hFrameWnd, NULL);
+ }
}
case WM_KEYDOWN:
More information about the wine-cvs
mailing list