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
326af51e
Commit
326af51e
authored
Mar 28, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 30, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Fix item focus rectangle to use proper label/selection bounds.
parent
10d51ce8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
24 deletions
+29
-24
listview.c
dlls/comctl32/listview.c
+29
-24
No files found.
dlls/comctl32/listview.c
View file @
326af51e
...
...
@@ -4550,6 +4550,7 @@ static inline BOOL LISTVIEW_FillBkgnd(const LISTVIEW_INFO *infoPtr, HDC hdc, con
static
void
LISTVIEW_DrawItemPart
(
LISTVIEW_INFO
*
infoPtr
,
LVITEMW
*
item
,
const
NMLVCUSTOMDRAW
*
nmlvcd
,
const
POINT
*
pos
)
{
RECT
rcSelect
,
rcLabel
,
rcBox
,
rcStateIcon
,
rcIcon
;
const
RECT
*
background
;
HIMAGELIST
himl
;
UINT
format
;
RECT
*
focus
;
...
...
@@ -4579,37 +4580,41 @@ static void LISTVIEW_DrawItemPart(LISTVIEW_INFO *infoPtr, LVITEMW *item, const N
if
(
infoPtr
->
uView
==
LV_VIEW_ICON
||
(
infoPtr
->
uView
==
LV_VIEW_DETAILS
&&
(
!
(
item
->
state
&
LVIS_SELECTED
)
||
(
infoPtr
->
dwLvExStyle
&
LVS_EX_FULLROWSELECT
))))
rcSelect
=
rcLabel
;
background
=
&
rcLabel
;
else
background
=
&
rcSelect
;
if
(
nmlvcd
->
clrTextBk
!=
CLR_NONE
)
ExtTextOutW
(
nmlvcd
->
nmcd
.
hdc
,
rcSelect
.
left
,
rcSelect
.
top
,
ETO_OPAQUE
,
&
rcSelect
,
NULL
,
0
,
NULL
);
ExtTextOutW
(
nmlvcd
->
nmcd
.
hdc
,
background
->
left
,
background
->
top
,
ETO_OPAQUE
,
background
,
NULL
,
0
,
NULL
);
if
(
item
->
state
&
LVIS_FOCUSED
)
{
if
(
infoPtr
->
uView
==
LV_VIEW_DETAILS
&&
(
infoPtr
->
dwLvExStyle
&
LVS_EX_FULLROWSELECT
))
{
/* we have to update left focus bound too if item isn't in leftmost column
and reduce right box bound */
if
(
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
)
>
0
)
{
INT
leftmost
;
if
((
leftmost
=
SendMessageW
(
infoPtr
->
hwndHeader
,
HDM_ORDERTOINDEX
,
0
,
0
)))
{
INT
Originx
=
pos
->
x
-
LISTVIEW_GetColumnInfo
(
infoPtr
,
0
)
->
rcHeader
.
left
;
INT
index
=
SendMessageW
(
infoPtr
->
hwndHeader
,
HDM_ORDERTOINDEX
,
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
)
-
1
,
0
);
rcBox
.
right
=
LISTVIEW_GetColumnInfo
(
infoPtr
,
index
)
->
rcHeader
.
right
+
Originx
;
rcSelect
.
left
=
LISTVIEW_GetColumnInfo
(
infoPtr
,
leftmost
)
->
rcHeader
.
left
+
Originx
;
}
}
if
(
infoPtr
->
uView
==
LV_VIEW_DETAILS
)
{
if
(
infoPtr
->
dwLvExStyle
&
LVS_EX_FULLROWSELECT
)
{
/* we have to update left focus bound too if item isn't in leftmost column
and reduce right box bound */
if
(
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
)
>
0
)
{
INT
leftmost
;
rcSelect
.
right
=
rcBox
.
right
;
}
if
((
leftmost
=
SendMessageW
(
infoPtr
->
hwndHeader
,
HDM_ORDERTOINDEX
,
0
,
0
)))
{
INT
Originx
=
pos
->
x
-
LISTVIEW_GetColumnInfo
(
infoPtr
,
0
)
->
rcHeader
.
left
;
INT
index
=
SendMessageW
(
infoPtr
->
hwndHeader
,
HDM_ORDERTOINDEX
,
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
)
-
1
,
0
);
/* store new focus rectangle */
infoPtr
->
rcFocus
=
rcSelect
;
rcBox
.
right
=
LISTVIEW_GetColumnInfo
(
infoPtr
,
index
)
->
rcHeader
.
right
+
Originx
;
rcSelect
.
left
=
LISTVIEW_GetColumnInfo
(
infoPtr
,
leftmost
)
->
rcHeader
.
left
+
Originx
;
}
}
rcSelect
.
right
=
rcBox
.
right
;
}
infoPtr
->
rcFocus
=
rcSelect
;
}
else
infoPtr
->
rcFocus
=
rcLabel
;
}
/* state icons */
...
...
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