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
7b995929
Commit
7b995929
authored
Mar 10, 2007
by
Felix Nawothnig
Committed by
Alexandre Julliard
Mar 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fix my last patch.
My last patch was wrong and caused some nasty regressions. Mapping CLR_DEFAULT to the global defaults seem to be what native does.
parent
eba06046
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
listview.c
dlls/comctl32/listview.c
+7
-3
listview.c
dlls/comctl32/tests/listview.c
+2
-2
No files found.
dlls/comctl32/listview.c
View file @
7b995929
...
...
@@ -946,6 +946,11 @@ static inline DWORD notify_customdraw (LISTVIEW_INFO *infoPtr, DWORD dwDrawStage
static
void
prepaint_setup
(
LISTVIEW_INFO
*
infoPtr
,
HDC
hdc
,
NMLVCUSTOMDRAW
*
lpnmlvcd
)
{
if
(
lpnmlvcd
->
clrTextBk
==
CLR_DEFAULT
)
lpnmlvcd
->
clrTextBk
=
comctl32_color
.
clrWindow
;
if
(
lpnmlvcd
->
clrText
==
CLR_DEFAULT
)
lpnmlvcd
->
clrText
=
comctl32_color
.
clrWindowText
;
/* apprently, for selected items, we have to override the returned values */
if
(
lpnmlvcd
->
nmcd
.
uItemState
&
CDIS_SELECTED
)
{
...
...
@@ -965,8 +970,7 @@ static void prepaint_setup (LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRAW *lpn
if
(
lpnmlvcd
->
clrTextBk
!=
CLR_NONE
)
{
SetBkMode
(
hdc
,
OPAQUE
);
if
(
lpnmlvcd
->
clrTextBk
!=
CLR_DEFAULT
)
SetBkColor
(
hdc
,
lpnmlvcd
->
clrTextBk
);
SetBkColor
(
hdc
,
lpnmlvcd
->
clrTextBk
);
}
else
SetBkMode
(
hdc
,
TRANSPARENT
);
...
...
@@ -7717,7 +7721,7 @@ static LRESULT LISTVIEW_NCCreate(HWND hwnd, const CREATESTRUCTW *lpcs)
/* initialize color information */
infoPtr
->
clrBk
=
CLR_NONE
;
infoPtr
->
clrText
=
comctl32_color
.
clrWindowText
;
infoPtr
->
clrText
=
CLR_DEFAULT
;
infoPtr
->
clrTextBk
=
CLR_DEFAULT
;
LISTVIEW_SetBkColor
(
infoPtr
,
comctl32_color
.
clrWindow
);
...
...
dlls/comctl32/tests/listview.c
View file @
7b995929
...
...
@@ -624,11 +624,11 @@ static LRESULT WINAPI cd_wndproc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
return
CDRF_NOTIFYSUBITEMDRAW
;
case
CDDS_ITEMPREPAINT
|
CDDS_SUBITEM
:
clr
=
GetBkColor
(
nmlvcd
->
nmcd
.
hdc
);
ok
(
clr
==
c0ffee
,
"clr=%.8x
\n
"
,
clr
);
todo_wine
ok
(
clr
==
c0ffee
,
"clr=%.8x
\n
"
,
clr
);
return
CDRF_NOTIFYPOSTPAINT
;
case
CDDS_ITEMPOSTPAINT
|
CDDS_SUBITEM
:
clr
=
GetBkColor
(
nmlvcd
->
nmcd
.
hdc
);
ok
(
clr
==
c0ffee
,
"clr=%.8x
\n
"
,
clr
);
todo_wine
ok
(
clr
==
c0ffee
,
"clr=%.8x
\n
"
,
clr
);
return
CDRF_DODEFAULT
;
}
return
CDRF_DODEFAULT
;
...
...
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