Commit 9650f21b authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

user32: Actually use the menu's background brush.

parent 14f7fd4e
...@@ -1737,15 +1737,17 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, ...@@ -1737,15 +1737,17 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
*/ */
static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu ) static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
{ {
HBRUSH hPrevBrush = 0; HBRUSH hPrevBrush = 0, brush = GetSysColorBrush( COLOR_MENU );
RECT rect; RECT rect;
POPUPMENU *menu = MENU_GetMenu( hmenu );
TRACE("wnd=%p dc=%p menu=%p\n", hwnd, hdc, hmenu); TRACE("wnd=%p dc=%p menu=%p\n", hwnd, hdc, hmenu);
GetClientRect( hwnd, &rect ); GetClientRect( hwnd, &rect );
if((hPrevBrush = SelectObject( hdc, GetSysColorBrush(COLOR_MENU) )) if (menu && menu->hbrBack) brush = menu->hbrBack;
&& (SelectObject( hdc, get_menu_font(FALSE)))) if ((hPrevBrush = SelectObject( hdc, brush ))
&& SelectObject( hdc, get_menu_font(FALSE) ))
{ {
HPEN hPrevPen; HPEN hPrevPen;
...@@ -1754,7 +1756,6 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu ) ...@@ -1754,7 +1756,6 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
hPrevPen = SelectObject( hdc, GetStockObject( NULL_PEN ) ); hPrevPen = SelectObject( hdc, GetStockObject( NULL_PEN ) );
if( hPrevPen ) if( hPrevPen )
{ {
POPUPMENU *menu;
BOOL flat_menu = FALSE; BOOL flat_menu = FALSE;
SystemParametersInfoW (SPI_GETFLATMENU, 0, &flat_menu, 0); SystemParametersInfoW (SPI_GETFLATMENU, 0, &flat_menu, 0);
...@@ -1763,7 +1764,7 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu ) ...@@ -1763,7 +1764,7 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
else else
DrawEdge (hdc, &rect, EDGE_RAISED, BF_RECT); DrawEdge (hdc, &rect, EDGE_RAISED, BF_RECT);
if( (menu = MENU_GetMenu( hmenu ))) if (menu)
{ {
TRACE("hmenu %p Style %08x\n", hmenu, menu->dwStyle); TRACE("hmenu %p Style %08x\n", hmenu, menu->dwStyle);
/* draw menu items */ /* draw menu items */
......
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