Ulrich Czekalla ulrich.czekalla at
Fri Mar 25 08:37:46 CST 2005

As far as I can tell the POINT conversion to client coordinates doesn't
make sense. The rest of the code assumes it's in screen coordinates. The
reason you don't see this bug is that parent of the menu bar is usually the
desktop or is NULL. This breaks my application because it has a child
window with a menu bar.

    Ulrich Czekalla <ulrich at>
    Don't map point to parent's client window because the rest of the
    code assumes screen coordinates
-------------- next part --------------
Index: dlls/user/menu.c
RCS file: /home/wine/wine/dlls/user/menu.c,v
retrieving revision 1.20
diff -u -p -r1.20 menu.c
--- dlls/user/menu.c	24 Mar 2005 15:18:51 -0000	1.20
+++ dlls/user/menu.c	25 Mar 2005 14:36:50 -0000
@@ -2966,10 +2966,6 @@ void MENU_TrackMouseMenuBar( HWND hWnd, 
     if (IsMenu(hMenu))
-        /* map point to parent client coordinates */
-        HWND parent = GetAncestor( hWnd, GA_PARENT );
-        if (parent != GetDesktopWindow()) ScreenToClient( parent, &pt );
 	MENU_InitTracking( hWnd, hMenu, FALSE, wFlags );
 	MENU_TrackMenu( hMenu, wFlags, pt.x, pt.y, hWnd, NULL );

More information about the wine-patches mailing list