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
0e0438bf
Commit
0e0438bf
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_PAINT implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1f296397
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
26 deletions
+25
-26
defwnd.c
dlls/user32/defwnd.c
+0
-25
defwnd.c
dlls/win32u/defwnd.c
+25
-1
No files found.
dlls/user32/defwnd.c
View file @
0e0438bf
...
...
@@ -266,31 +266,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
DEFWND_Print
(
hwnd
,
(
HDC
)
wParam
,
lParam
);
return
0
;
case
WM_PAINTICON
:
case
WM_PAINT
:
{
PAINTSTRUCT
ps
;
HDC
hdc
=
NtUserBeginPaint
(
hwnd
,
&
ps
);
if
(
hdc
)
{
HICON
hIcon
;
if
(
IsIconic
(
hwnd
)
&&
((
hIcon
=
(
HICON
)
GetClassLongPtrW
(
hwnd
,
GCLP_HICON
)))
)
{
RECT
rc
;
int
x
,
y
;
GetClientRect
(
hwnd
,
&
rc
);
x
=
(
rc
.
right
-
rc
.
left
-
GetSystemMetrics
(
SM_CXICON
))
/
2
;
y
=
(
rc
.
bottom
-
rc
.
top
-
GetSystemMetrics
(
SM_CYICON
))
/
2
;
TRACE
(
"Painting class icon: vis rect=(%s)
\n
"
,
wine_dbgstr_rect
(
&
ps
.
rcPaint
));
DrawIcon
(
hdc
,
x
,
y
,
hIcon
);
}
NtUserEndPaint
(
hwnd
,
&
ps
);
}
return
0
;
}
case
WM_SYNCPAINT
:
NtUserRedrawWindow
(
hwnd
,
NULL
,
0
,
RDW_ERASENOW
|
RDW_ERASE
|
RDW_ALLCHILDREN
);
return
0
;
...
...
dlls/win32u/defwnd.c
View file @
0e0438bf
...
...
@@ -243,7 +243,31 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
if
(
user_callbacks
)
user_callbacks
->
free_win_ptr
(
win
);
win
->
pScroll
=
NULL
;
release_win_ptr
(
win
);
return
0
;
break
;
}
case
WM_PAINTICON
:
case
WM_PAINT
:
{
PAINTSTRUCT
ps
;
HDC
hdc
=
NtUserBeginPaint
(
hwnd
,
&
ps
);
if
(
hdc
)
{
HICON
icon
;
if
(
is_iconic
(
hwnd
)
&&
((
icon
=
UlongToHandle
(
get_class_long
(
hwnd
,
GCLP_HICON
,
FALSE
)))))
{
RECT
rc
;
int
x
,
y
;
get_client_rect
(
hwnd
,
&
rc
);
x
=
(
rc
.
right
-
rc
.
left
-
get_system_metrics
(
SM_CXICON
))
/
2
;
y
=
(
rc
.
bottom
-
rc
.
top
-
get_system_metrics
(
SM_CYICON
))
/
2
;
TRACE
(
"Painting class icon: vis rect=(%s)
\n
"
,
wine_dbgstr_rect
(
&
ps
.
rcPaint
)
);
NtUserDrawIconEx
(
hdc
,
x
,
y
,
icon
,
0
,
0
,
0
,
0
,
DI_NORMAL
|
DI_COMPAT
|
DI_DEFAULTSIZE
);
}
NtUserEndPaint
(
hwnd
,
&
ps
);
}
break
;
}
case
WM_SETTEXT
:
...
...
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