winefile patch 2
Martin Fuchs
martin-fuchs at gmx.net
Wed May 11 09:58:34 CDT 2005
Changelog:
Fix of Alexandre's patch "Avoid using the MAKEPOINTS macro, it's broken on big endian." of 2004/11/24
The call to ScreenToClient() changes the content of the 'pt' variable, so it can't be used for the following ShellFolderContextMenu() call
Index: winefile.c
===================================================================
RCS file: /home/wine/wine/programs/winefile/winefile.c,v
retrieving revision 1.33
diff -u -p -d -r1.33 winefile.c
--- winefile.c 4 May 2005 09:47:07 -0000 1.33
+++ winefile.c 11 May 2005 14:48:40 -0000
@@ -3712,17 +3712,17 @@ LRESULT CALLBACK ChildWndProc(HWND hwnd,
#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;
More information about the wine-patches
mailing list