ignore requested height for non-menubar ownerdraw popups

Felix Nawothnig felix.nawothnig at t-online.de
Sun May 8 04:14:52 CDT 2005


This fixes bug 2764 (the scrolling issue seems to be resolved  
already?). Verified this behaviour on WinXP and changed the comment to  
reflect that.

ChangeLog:
Ignore requested height for non-menubar ownerdraw popups too.
-------------- next part --------------
Index: menu.c
===================================================================
RCS file: /home/wine/wine/dlls/user/menu.c,v
retrieving revision 1.26
diff -u -r1.26 menu.c
--- menu.c	19 Apr 2005 09:47:02 -0000	1.26
+++ menu.c	8 May 2005 09:09:06 -0000
@@ -887,17 +887,14 @@
         SendMessageW( hwndOwner, WM_MEASUREITEM, 0, (LPARAM)&mis );
         lpitem->rect.right  += mis.itemWidth;
 
- 	if (menuBar)
-	{
-	     lpitem->rect.right += MENU_BAR_ITEMS_SPACE;
+	/* under windows you are given a standard height for the
+	   menu and the height value is ignored. delphi 7 depends
+	   on this behaviour. */
 
+	lpitem->rect.bottom += GetSystemMetrics(SM_CYMENU)-1;
 
-             /* under at least win95 you seem to be given a standard
-                height for the menu and the height value is ignored */
-	     lpitem->rect.bottom += GetSystemMetrics(SM_CYMENU)-1;
-        }
-        else
-            lpitem->rect.bottom += mis.itemHeight;
+ 	if (menuBar)
+	     lpitem->rect.right += MENU_BAR_ITEMS_SPACE;
 
 	TRACE("id=%04x size=%dx%d\n",
                      lpitem->wID, mis.itemWidth, mis.itemHeight);


More information about the wine-patches mailing list