Module: wine Branch: master Commit: 029aec19ff7676433b61896699fe452aad72f0ac URL: http://source.winehq.org/git/wine.git/?a=commit;h=029aec19ff7676433b61896699...
Author: Ken Thomases ken@codeweavers.com Date: Wed Jul 24 17:35:50 2013 -0500
user32: Remove dead code for suppressing menu drawing.
---
dlls/user32/controls.h | 3 +-- dlls/user32/menu.c | 19 ++----------------- dlls/user32/nonclient.c | 8 ++++---- 3 files changed, 7 insertions(+), 23 deletions(-)
diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index e168f16..32e9815 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -160,8 +160,7 @@ extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth, extern BOOL MENU_SetMenu(HWND, HMENU) DECLSPEC_HIDDEN; extern void MENU_TrackMouseMenuBar( HWND hwnd, INT ht, POINT pt ) DECLSPEC_HIDDEN; extern void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam, WCHAR wChar ) DECLSPEC_HIDDEN; -extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, - HWND hwnd, BOOL suppress_draw ) DECLSPEC_HIDDEN; +extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, HWND hwnd ) DECLSPEC_HIDDEN; extern void MENU_EndMenu(HWND) DECLSPEC_HIDDEN;
/* nonclient area */ diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index f39ae7c..73b20b9 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -1801,11 +1801,9 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu ) * Paint a menu bar. Returns the height of the menu bar. * called from [windows/nonclient.c] */ -UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, HWND hwnd, - BOOL suppress_draw) +UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, HWND hwnd ) { LPPOPUPMENU lppop; - HFONT hfontOld = 0; HMENU hMenu = GetMenu(hwnd);
lppop = MENU_GetMenu( hMenu ); @@ -1814,20 +1812,7 @@ UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, HWND hwnd, return GetSystemMetrics(SM_CYMENU); }
- if (suppress_draw) - { - hfontOld = SelectObject( hDC, get_menu_font(FALSE)); - - if (lppop->Height == 0) - MENU_MenuBarCalcSize(hDC, lprect, lppop, hwnd); - - lprect->bottom = lprect->top + lppop->Height; - - if (hfontOld) SelectObject( hDC, hfontOld); - return lppop->Height; - } - else - return DrawMenuBarTemp(hwnd, hDC, lprect, hMenu, NULL); + return DrawMenuBarTemp(hwnd, hDC, lprect, hMenu, NULL); }
diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c index 050af90..da9c6bd 100644 --- a/dlls/user32/nonclient.c +++ b/dlls/user32/nonclient.c @@ -980,7 +980,7 @@ static void NC_DrawCaption( HDC hdc, RECT *rect, HWND hwnd, DWORD style, * * Paint the non-client area for windows. */ -static void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint ) +static void NC_DoNCPaint( HWND hwnd, HRGN clip ) { HDC hdc; RECT rfuzz, rect, rectClip; @@ -1062,7 +1062,7 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint )
TRACE("Calling DrawMenuBar with rect (%s)\n", wine_dbgstr_rect(&r));
- rect.top += MENU_DrawMenuBar( hdc, &r, hwnd, suppress_menupaint ) + 1; + rect.top += MENU_DrawMenuBar( hdc, &r, hwnd ) + 1; }
TRACE("After MenuBar, rect is (%s).\n", wine_dbgstr_rect(&rect)); @@ -1109,7 +1109,7 @@ LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip) if( dwStyle & WS_MINIMIZE ) WINPOS_RedrawIconTitle( hwnd ); else - NC_DoNCPaint( hwnd, clip, FALSE ); + NC_DoNCPaint( hwnd, clip ); } return 0; } @@ -1143,7 +1143,7 @@ LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam ) if (IsIconic(hwnd)) WINPOS_RedrawIconTitle( hwnd ); else - NC_DoNCPaint( hwnd, (HRGN)1, FALSE ); + NC_DoNCPaint( hwnd, (HRGN)1 ); }
return TRUE;