win32u: Handle sys color brushes in fill_rect.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53004 Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
588bd3e7f2
commit
781b954424
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue