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
63ce060e
Commit
63ce060e
authored
May 11, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move default WM_ERASEBKGND implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
135e3176
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
28 deletions
+29
-28
defwnd.c
dlls/user32/defwnd.c
+0
-19
defwnd.c
dlls/win32u/defwnd.c
+28
-0
input.c
dlls/win32u/input.c
+0
-9
win32u_private.h
dlls/win32u/win32u_private.h
+1
-0
No files found.
dlls/user32/defwnd.c
View file @
63ce060e
...
...
@@ -266,25 +266,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
DEFWND_Print
(
hwnd
,
(
HDC
)
wParam
,
lParam
);
return
0
;
case
WM_ERASEBKGND
:
case
WM_ICONERASEBKGND
:
{
RECT
rect
;
HDC
hdc
=
(
HDC
)
wParam
;
HBRUSH
hbr
=
(
HBRUSH
)
GetClassLongPtrW
(
hwnd
,
GCLP_HBRBACKGROUND
);
if
(
!
hbr
)
return
0
;
if
(
GetClassLongW
(
hwnd
,
GCL_STYLE
)
&
CS_PARENTDC
)
{
/* can't use GetClipBox with a parent DC or we fill the whole parent */
GetClientRect
(
hwnd
,
&
rect
);
DPtoLP
(
hdc
,
(
LPPOINT
)
&
rect
,
2
);
}
else
GetClipBox
(
hdc
,
&
rect
);
FillRect
(
hdc
,
&
rect
,
hbr
);
return
1
;
}
case
WM_CTLCOLORMSGBOX
:
case
WM_CTLCOLOREDIT
:
case
WM_CTLCOLORLISTBOX
:
...
...
dlls/win32u/defwnd.c
View file @
63ce060e
...
...
@@ -31,6 +31,15 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
win
);
void
fill_rect
(
HDC
dc
,
const
RECT
*
rect
,
HBRUSH
hbrush
)
{
HBRUSH
prev_brush
;
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
);
}
/***********************************************************************
* AdjustWindowRectEx (win32u.so)
*/
...
...
@@ -310,6 +319,25 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
result
=
send_message
(
get_parent
(
hwnd
),
WM_MOUSEWHEEL
,
wparam
,
lparam
);
break
;
case
WM_ERASEBKGND
:
case
WM_ICONERASEBKGND
:
{
RECT
rect
;
HDC
hdc
=
(
HDC
)
wparam
;
HBRUSH
hbr
=
UlongToHandle
(
get_class_long
(
hwnd
,
GCLP_HBRBACKGROUND
,
FALSE
));
if
(
!
hbr
)
break
;
if
(
get_class_long
(
hwnd
,
GCL_STYLE
,
FALSE
)
&
CS_PARENTDC
)
{
/* can't use GetClipBox with a parent DC or we fill the whole parent */
get_client_rect
(
hwnd
,
&
rect
);
NtGdiTransformPoints
(
hdc
,
(
POINT
*
)
&
rect
,
(
POINT
*
)
&
rect
,
1
,
NtGdiDPtoLP
);
}
else
NtGdiGetAppClipBox
(
hdc
,
&
rect
);
fill_rect
(
hdc
,
&
rect
,
hbr
);
return
1
;
}
case
WM_GETDLGCODE
:
break
;
...
...
dlls/win32u/input.c
View file @
63ce060e
...
...
@@ -1799,15 +1799,6 @@ static void display_caret( HWND hwnd, const RECT *r )
NtUserReleaseDC
(
hwnd
,
dc
);
}
static
void
fill_rect
(
HDC
dc
,
const
RECT
*
rect
,
HBRUSH
hbrush
)
{
HBRUSH
prev_brush
;
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
);
}
static
unsigned
int
get_caret_registry_timeout
(
void
)
{
char
value_buffer
[
FIELD_OFFSET
(
KEY_VALUE_PARTIAL_INFORMATION
,
Data
[
11
*
sizeof
(
WCHAR
)])];
...
...
dlls/win32u/win32u_private.h
View file @
63ce060e
...
...
@@ -353,6 +353,7 @@ extern void register_window_surface( struct window_surface *old,
/* defwnd.c */
extern
LRESULT
default_window_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
BOOL
ansi
)
DECLSPEC_HIDDEN
;
extern
void
fill_rect
(
HDC
dc
,
const
RECT
*
rect
,
HBRUSH
hbrush
)
DECLSPEC_HIDDEN
;
/* hook.c */
extern
LRESULT
call_current_hook
(
HHOOK
hhook
,
INT
code
,
WPARAM
wparam
,
LPARAM
lparam
)
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