Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
209d1a86
Commit
209d1a86
authored
Oct 16, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Delay creation of the 55AA pattern brush until it's needed.
parent
7370a565
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
15 deletions
+29
-15
defwnd.c
dlls/user32/defwnd.c
+1
-1
nonclient.c
dlls/user32/nonclient.c
+1
-1
sysparams.c
dlls/user32/sysparams.c
+23
-9
text.c
dlls/user32/text.c
+1
-1
uitools.c
dlls/user32/uitools.c
+2
-2
user_private.h
dlls/user32/user_private.h
+1
-1
No files found.
dlls/user32/defwnd.c
View file @
209d1a86
...
...
@@ -167,7 +167,7 @@ HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType )
* look different from the window background.
*/
if
(
bk
==
GetSysColor
(
COLOR_WINDOW
))
return
SYSCOLOR_
55AABrush
;
return
SYSCOLOR_
Get55AABrush
()
;
UnrealizeObject
(
hb
);
return
hb
;
...
...
dlls/user32/nonclient.c
View file @
209d1a86
...
...
@@ -289,7 +289,7 @@ BOOL WINAPI DrawCaptionTempW (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont,
FillRect
(
hdc
,
&
rc
,
GetSysColorBrush
(
COLOR_3DFACE
));
if
(
uFlags
&
DC_ACTIVE
)
{
HBRUSH
hbr
=
SelectObject
(
hdc
,
SYSCOLOR_
55AABrush
);
HBRUSH
hbr
=
SelectObject
(
hdc
,
SYSCOLOR_
Get55AABrush
()
);
PatBlt
(
hdc
,
rc
.
left
,
rc
.
top
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
,
0xFA0089
);
SelectObject
(
hdc
,
hbr
);
...
...
dlls/user32/sysparams.c
View file @
209d1a86
...
...
@@ -242,12 +242,8 @@ static BOOL notify_change = TRUE;
/* System parameters storage */
static
RECT
work_area
;
static
const
WORD
wPattern55AA
[]
=
{
0x5555
,
0xaaaa
,
0x5555
,
0xaaaa
,
0x5555
,
0xaaaa
,
0x5555
,
0xaaaa
};
static
HKEY
volatile_base_key
;
HBRUSH
SYSCOLOR_55AABrush
=
0
;
union
sysparam_all_entry
;
struct
sysparam_entry
...
...
@@ -1346,11 +1342,6 @@ void SYSPARAMS_Init(void)
{
HKEY
key
;
DWORD
i
,
dispos
;
HBITMAP
h55AABitmap
=
CreateBitmap
(
8
,
8
,
1
,
1
,
wPattern55AA
);
SYSCOLOR_55AABrush
=
CreatePatternBrush
(
h55AABitmap
);
__wine_make_gdi_object_system
(
SYSCOLOR_55AABrush
,
TRUE
);
DeleteObject
(
h55AABitmap
);
/* this one must be non-volatile */
if
(
RegCreateKeyW
(
HKEY_CURRENT_USER
,
WINE_CURRENT_USER_REGKEY
,
&
key
))
...
...
@@ -2716,6 +2707,29 @@ HPEN SYSCOLOR_GetPen( INT index )
/***********************************************************************
* SYSCOLOR_Get55AABrush
*/
HBRUSH
SYSCOLOR_Get55AABrush
(
void
)
{
static
const
WORD
pattern
[]
=
{
0x5555
,
0xaaaa
,
0x5555
,
0xaaaa
,
0x5555
,
0xaaaa
,
0x5555
,
0xaaaa
};
static
HBRUSH
brush_55aa
;
if
(
!
brush_55aa
)
{
HBITMAP
bitmap
=
CreateBitmap
(
8
,
8
,
1
,
1
,
pattern
);
HBRUSH
brush
=
CreatePatternBrush
(
bitmap
);
DeleteObject
(
bitmap
);
__wine_make_gdi_object_system
(
brush
,
TRUE
);
if
(
InterlockedCompareExchangePointer
(
(
void
**
)
&
brush_55aa
,
brush
,
0
))
{
__wine_make_gdi_object_system
(
brush
,
FALSE
);
DeleteObject
(
brush
);
}
}
return
brush_55aa
;
}
/***********************************************************************
* ChangeDisplaySettingsA (USER32.@)
*/
LONG
WINAPI
ChangeDisplaySettingsA
(
LPDEVMODEA
devmode
,
DWORD
flags
)
...
...
dlls/user32/text.c
View file @
209d1a86
...
...
@@ -1240,7 +1240,7 @@ static BOOL TEXT_GrayString(HDC hdc, HBRUSH hb, GRAYSTRINGPROC fn, LPARAM lp, IN
if
(
retval
||
len
!=
-
1
)
#endif
{
hbsave
=
SelectObject
(
memdc
,
SYSCOLOR_
55AABrush
);
hbsave
=
SelectObject
(
memdc
,
SYSCOLOR_
Get55AABrush
()
);
PatBlt
(
memdc
,
0
,
0
,
cx
,
cy
,
0x000A0329
);
SelectObject
(
memdc
,
hbsave
);
}
...
...
dlls/user32/uitools.c
View file @
209d1a86
...
...
@@ -649,7 +649,7 @@ static void UITOOLS_DrawCheckedRect( HDC dc, LPRECT rect )
FillRect
(
dc
,
rect
,
GetSysColorBrush
(
COLOR_BTNFACE
));
bg
=
SetBkColor
(
dc
,
RGB
(
255
,
255
,
255
));
hbsave
=
SelectObject
(
dc
,
SYSCOLOR_
55AABrush
);
hbsave
=
SelectObject
(
dc
,
SYSCOLOR_
Get55AABrush
()
);
PatBlt
(
dc
,
rect
->
left
,
rect
->
top
,
rect
->
right
-
rect
->
left
,
rect
->
bottom
-
rect
->
top
,
0x00FA0089
);
SelectObject
(
dc
,
hbsave
);
SetBkColor
(
dc
,
bg
);
...
...
@@ -1703,7 +1703,7 @@ static BOOL UITOOLS_DrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC func, LPARAM lp
/* This state cause the image to be dithered */
if
(
flags
&
DSS_UNION
)
{
hbsave
=
SelectObject
(
memdc
,
SYSCOLOR_
55AABrush
);
hbsave
=
SelectObject
(
memdc
,
SYSCOLOR_
Get55AABrush
()
);
if
(
!
hbsave
)
goto
cleanup
;
tmp
=
PatBlt
(
memdc
,
0
,
0
,
cx
,
cy
,
0x00FA0089
);
SelectObject
(
memdc
,
hbsave
);
...
...
dlls/user32/user_private.h
View file @
209d1a86
...
...
@@ -209,7 +209,6 @@ static inline BOOL is_broadcast( HWND hwnd )
}
extern
HMODULE
user32_module
DECLSPEC_HIDDEN
;
extern
HBRUSH
SYSCOLOR_55AABrush
DECLSPEC_HIDDEN
;
struct
dce
;
struct
tagWND
;
...
...
@@ -234,6 +233,7 @@ extern LRESULT MSG_SendInternalMessageTimeout( DWORD dest_pid, DWORD dest_tid,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
UINT
flags
,
UINT
timeout
,
PDWORD_PTR
res_ptr
)
DECLSPEC_HIDDEN
;
extern
HPEN
SYSCOLOR_GetPen
(
INT
index
)
DECLSPEC_HIDDEN
;
extern
HBRUSH
SYSCOLOR_Get55AABrush
(
void
)
DECLSPEC_HIDDEN
;
extern
void
SYSPARAMS_Init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
USER_CheckNotLock
(
void
)
DECLSPEC_HIDDEN
;
extern
BOOL
USER_IsExitingThread
(
DWORD
tid
)
DECLSPEC_HIDDEN
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment