Commit 962d5e64 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

user32: Don't bother drawing an item if it's outside the items_rect.

parent 21c5545a
......@@ -1417,6 +1417,12 @@ static void MENU_DrawMenuItem( HWND hwnd, POPUPMENU *menu, HWND hwndOwner, HDC h
return;
}
TRACE( "rect=%s\n", wine_dbgstr_rect( &lpitem->rect ) );
rect = lpitem->rect;
MENU_AdjustMenuItemRect( menu, &rect );
if (!IntersectRect( &bmprc, &rect, &menu->items_rect )) /* bmprc is used as a dummy */
return;
SystemParametersInfoW (SPI_GETFLATMENU, 0, &flat_menu, 0);
bkgnd = (menuBar && flat_menu) ? COLOR_MENUBAR : COLOR_MENU;
......@@ -1444,10 +1450,6 @@ static void MENU_DrawMenuItem( HWND hwnd, POPUPMENU *menu, HWND hwndOwner, HDC h
SetBkColor( hdc, GetSysColor( bkgnd ) );
}
TRACE("rect=%s\n", wine_dbgstr_rect( &lpitem->rect));
rect = lpitem->rect;
MENU_AdjustMenuItemRect(menu, &rect);
old_clip = CreateRectRgn( 0, 0, 0, 0 );
if (GetClipRgn( hdc, old_clip ) <= 0)
{
......
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