Commit 781b9544 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Handle sys color brushes in fill_rect.

parent 588bd3e7
......@@ -35,6 +35,8 @@ void fill_rect( HDC dc, const RECT *rect, HBRUSH hbrush )
{
HBRUSH prev_brush;
if (hbrush <= (HBRUSH)(COLOR_MENUBAR + 1)) hbrush = get_sys_color_brush( HandleToULong(hbrush) - 1 );
prev_brush = NtGdiSelectBrush( dc, hbrush );
NtGdiPatBlt( dc, rect->left, rect->top, rect->right - rect->left, rect->bottom - rect->top, PATCOPY );
if (prev_brush) NtGdiSelectBrush( dc, prev_brush );
......
......@@ -4506,7 +4506,7 @@ static HBRUSH get_55aa_brush(void)
return brush_55aa;
}
static HBRUSH get_sys_color_brush( unsigned int index )
HBRUSH get_sys_color_brush( unsigned int index )
{
if (index == COLOR_55AA_BRUSH) return get_55aa_brush();
if (index >= ARRAY_SIZE( system_colors )) return 0;
......
......@@ -404,6 +404,7 @@ extern UINT get_monitor_dpi( HMONITOR monitor ) DECLSPEC_HIDDEN;
extern BOOL get_monitor_info( HMONITOR handle, MONITORINFO *info ) DECLSPEC_HIDDEN;
extern UINT get_win_monitor_dpi( HWND hwnd ) DECLSPEC_HIDDEN;
extern RECT get_primary_monitor_rect( UINT dpi ) DECLSPEC_HIDDEN;
extern HBRUSH get_sys_color_brush( unsigned int index ) DECLSPEC_HIDDEN;
extern UINT get_system_dpi(void) DECLSPEC_HIDDEN;
extern int get_system_metrics( int index ) DECLSPEC_HIDDEN;
extern UINT get_thread_dpi(void) DECLSPEC_HIDDEN;
......
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