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
50c3b530
Commit
50c3b530
authored
May 03, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Forward WM_ERASEBKGND to parent on CLR_NONE.
parent
1fac98d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
5 deletions
+31
-5
listview.c
dlls/comctl32/listview.c
+3
-2
listview.c
dlls/comctl32/tests/listview.c
+28
-3
No files found.
dlls/comctl32/listview.c
View file @
50c3b530
...
...
@@ -36,8 +36,6 @@
* -- EN_KILLFOCUS should be handled in WM_COMMAND
* -- WM_CREATE: create the icon and small icon image lists at this point only if
* the LVS_SHAREIMAGELISTS style is not specified.
* -- WM_ERASEBKGND: forward this message to the parent window if the bkgnd
* color is CLR_NONE.
* -- WM_WINDOWPOSCHANGED: arrange the list items if the current view is icon
* or small icon and the LVS_AUTOARRANGE style is specified.
* -- WM_TIMER
...
...
@@ -8290,6 +8288,9 @@ static inline BOOL LISTVIEW_EraseBkgnd(const LISTVIEW_INFO *infoPtr, HDC hdc)
if
(
!
GetClipBox
(
hdc
,
&
rc
))
return
FALSE
;
if
(
infoPtr
->
clrBk
==
CLR_NONE
)
return
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_ERASEBKGND
,
(
WPARAM
)
hdc
,
0
);
/* for double buffered controls we need to do this during refresh */
if
(
infoPtr
->
dwLvExStyle
&
LVS_EX_DOUBLEBUFFER
)
return
FALSE
;
...
...
dlls/comctl32/tests/listview.c
View file @
50c3b530
...
...
@@ -1068,6 +1068,7 @@ static void test_redraw(void)
HWND
hwnd
,
hwndheader
;
HDC
hdc
;
BOOL
res
;
DWORD
r
;
hwnd
=
create_listview_control
(
0
);
hwndheader
=
subclass_header
(
hwnd
);
...
...
@@ -1082,21 +1083,45 @@ static void test_redraw(void)
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
/* forward WM_ERASEBKGND to parent on CLR_NONE background color */
/* 1. Without backbuffer */
res
=
ListView_SetBkColor
(
hwnd
,
CLR_NONE
);
expect
(
TRUE
,
res
);
hdc
=
GetWindowDC
(
hwndparent
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
SendMessageA
(
hwnd
,
WM_ERASEBKGND
,
(
WPARAM
)
hdc
,
0
);
r
=
SendMessageA
(
hwnd
,
WM_ERASEBKGND
,
(
WPARAM
)
hdc
,
0
);
ok
(
r
!=
0
,
"Expected not zero result
\n
"
);
ok_sequence
(
sequences
,
PARENT_FULL_SEQ_INDEX
,
forward_erasebkgnd_parent_seq
,
"forward WM_ERASEBKGND on CLR_NONE"
,
FALSE
);
res
=
ListView_SetBkColor
(
hwnd
,
CLR_DEFAULT
);
expect
(
TRUE
,
res
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
r
=
SendMessageA
(
hwnd
,
WM_ERASEBKGND
,
(
WPARAM
)
hdc
,
0
);
ok
(
r
!=
0
,
"Expected not zero result
\n
"
);
ok_sequence
(
sequences
,
PARENT_FULL_SEQ_INDEX
,
empty_seq
,
"don't forward WM_ERASEBKGND on non-CLR_NONE"
,
FALSE
);
/* 2. With backbuffer */
SendMessageA
(
hwnd
,
LVM_SETEXTENDEDLISTVIEWSTYLE
,
LVS_EX_DOUBLEBUFFER
,
LVS_EX_DOUBLEBUFFER
);
res
=
ListView_SetBkColor
(
hwnd
,
CLR_NONE
);
expect
(
TRUE
,
res
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
r
=
SendMessageA
(
hwnd
,
WM_ERASEBKGND
,
(
WPARAM
)
hdc
,
0
);
ok
(
r
!=
0
,
"Expected not zero result
\n
"
);
ok_sequence
(
sequences
,
PARENT_FULL_SEQ_INDEX
,
forward_erasebkgnd_parent_seq
,
"forward WM_ERASEBKGND on CLR_NONE"
,
TRU
E
);
"forward WM_ERASEBKGND on CLR_NONE"
,
FALS
E
);
res
=
ListView_SetBkColor
(
hwnd
,
CLR_DEFAULT
);
expect
(
TRUE
,
res
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
SendMessageA
(
hwnd
,
WM_ERASEBKGND
,
(
WPARAM
)
hdc
,
0
);
r
=
SendMessageA
(
hwnd
,
WM_ERASEBKGND
,
(
WPARAM
)
hdc
,
0
);
todo_wine
ok
(
r
!=
0
,
"Expected not zero result
\n
"
);
ok_sequence
(
sequences
,
PARENT_FULL_SEQ_INDEX
,
empty_seq
,
"don't forward WM_ERASEBKGND on non-CLR_NONE"
,
FALSE
);
...
...
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