https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1d55f459d6402eb5f97e5…
commit 1d55f459d6402eb5f97e5ebf65a32e24cdd7a13b
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Sat Oct 27 11:53:56 2018 +0300
Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
CommitDate: Tue Nov 27 12:58:08 2018 +0200
[SHELL32] CFSDropTarget: Fix right click menu when shown over the tree view.
CORE-11240
---
dll/win32/shell32/droptargets/CFSDropTarget.cpp | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/dll/win32/shell32/droptargets/CFSDropTarget.cpp
b/dll/win32/shell32/droptargets/CFSDropTarget.cpp
index 41d4bab1c1..641770b37a 100644
--- a/dll/win32/shell32/droptargets/CFSDropTarget.cpp
+++ b/dll/win32/shell32/droptargets/CFSDropTarget.cpp
@@ -206,9 +206,26 @@ HRESULT CFSDropTarget::_GetEffectFromMenu(IDataObject *pDataObject,
POINTL pt, D
/* FIXME: We need to support shell extensions here */
+ /* We shouldn't use the site window here because the menu should work even when
we don't have a site */
+ HWND hwndDummy = CreateWindowEx(0,
+ WC_STATIC,
+ NULL,
+ WS_OVERLAPPED | WS_DISABLED | WS_CLIPSIBLINGS | WS_BORDER |
SS_LEFT,
+ pt.x,
+ pt.y,
+ 1,
+ 1,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
+
UINT uCommand = TrackPopupMenu(hpopupmenu,
TPM_LEFTALIGN | TPM_RETURNCMD | TPM_LEFTBUTTON |
TPM_RIGHTBUTTON | TPM_NONOTIFY,
- pt.x, pt.y, 0, m_hwndSite, NULL);
+ pt.x, pt.y, 0, hwndDummy, NULL);
+
+ DestroyWindow(hwndDummy);
+
if (uCommand == 0)
return S_FALSE;
else if (uCommand == IDM_COPYHERE)