Commit 0ba99b10 authored by Martin Fuchs's avatar Martin Fuchs Committed by Alexandre Julliard

The call to ScreenToClient() changes the content of the 'pt' variable,

so it can't be used for the following ShellFolderContextMenu() call.
parent 34d30493
......@@ -3953,17 +3953,17 @@ LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
#ifdef _SHELL_FOLDERS
case WM_CONTEXTMENU: {
POINT pt, pt_clnt;
Pane* pane;
int idx;
/* first select the current item in the listbox */
HWND hpanel = (HWND) wparam;
POINT pt;
pt.x = (short)LOWORD(lparam);
pt.y = (short)HIWORD(lparam);
ScreenToClient(hpanel, &pt);
SendMessage(hpanel, WM_LBUTTONDOWN, 0, MAKELONG(pt.x, pt.y));
SendMessage(hpanel, WM_LBUTTONUP, 0, MAKELONG(pt.x, pt.y));
pt_clnt.x = pt.x = (short)LOWORD(lparam);
pt_clnt.y = pt.y = (short)HIWORD(lparam);
ScreenToClient(hpanel, &pt_clnt);
SendMessage(hpanel, WM_LBUTTONDOWN, 0, MAKELONG(pt_clnt.x, pt_clnt.y));
SendMessage(hpanel, WM_LBUTTONUP, 0, MAKELONG(pt_clnt.x, pt_clnt.y));
/* now create the popup menu using shell namespace and IContextMenu */
pane = GetFocus()==child->left.hwnd? &child->left: &child->right;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment