Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a058c72b
Commit
a058c72b
authored
Apr 23, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/button: Improve repainting on WM_SETFOCUS.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9ed363a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
button.c
dlls/comctl32/button.c
+6
-1
button.c
dlls/comctl32/tests/button.c
+1
-2
No files found.
dlls/comctl32/button.c
View file @
a058c72b
...
...
@@ -815,7 +815,12 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
case
WM_SETFOCUS
:
TRACE
(
"WM_SETFOCUS %p
\n
"
,
hWnd
);
infoPtr
->
state
|=
BST_FOCUS
;
paint_button
(
infoPtr
,
btn_type
,
ODA_FOCUS
);
if
(
btn_type
==
BS_OWNERDRAW
)
paint_button
(
infoPtr
,
btn_type
,
ODA_FOCUS
);
else
InvalidateRect
(
hWnd
,
NULL
,
FALSE
);
if
(
style
&
BS_NOTIFY
)
BUTTON_NOTIFY_PARENT
(
hWnd
,
BN_SETFOCUS
);
break
;
...
...
dlls/comctl32/tests/button.c
View file @
a058c72b
...
...
@@ -782,12 +782,11 @@ static void test_button_messages(void)
set_test_cd_ret
(
CDRF_DODEFAULT
);
set_test_cd_state
(
CDIS_FOCUS
);
todo
=
button
[
i
].
style
!=
BS_OWNERDRAW
;
ok
(
GetFocus
()
==
0
,
"expected focus 0, got %p
\n
"
,
GetFocus
());
SetFocus
(
hwnd
);
SendMessageA
(
hwnd
,
WM_APP
,
0
,
0
);
/* place a separator mark here */
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
ok_sequence
(
sequences
,
COMBINED_SEQ_INDEX
,
button
[
i
].
setfocus
,
"SetFocus(hwnd) on a button"
,
todo
);
ok_sequence
(
sequences
,
COMBINED_SEQ_INDEX
,
button
[
i
].
setfocus
,
"SetFocus(hwnd) on a button"
,
FALSE
);
check_cd_seq
(
cd_setfocus_type
,
"SetFocus(hwnd)"
);
set_test_cd_state
(
0
);
...
...
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