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
4dd26ee8
Commit
4dd26ee8
authored
Oct 06, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Don't ask for WM_MOUSEHOVER messages when LVS_EX_TRACKSELECT was not specified.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
parent
0b1204d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
listview.c
dlls/comctl32/listview.c
+7
-2
listview.c
dlls/comctl32/tests/listview.c
+41
-0
No files found.
dlls/comctl32/listview.c
View file @
4dd26ee8
...
...
@@ -4122,6 +4122,7 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN
/* see if we are supposed to be tracking mouse hovering */
if
(
LISTVIEW_IsHotTracking
(
infoPtr
))
{
TRACKMOUSEEVENT
trackinfo
;
DWORD
flags
;
trackinfo
.
cbSize
=
sizeof
(
TRACKMOUSEEVENT
);
trackinfo
.
dwFlags
=
TME_QUERY
;
...
...
@@ -4129,8 +4130,12 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN
/* see if we are already tracking this hwnd */
_TrackMouseEvent
(
&
trackinfo
);
if
(
!
(
trackinfo
.
dwFlags
&
TME_HOVER
)
||
trackinfo
.
hwndTrack
!=
infoPtr
->
hwndSelf
)
{
trackinfo
.
dwFlags
=
TME_HOVER
;
flags
=
TME_LEAVE
;
if
(
infoPtr
->
dwLvExStyle
&
LVS_EX_TRACKSELECT
)
flags
|=
TME_HOVER
;
if
((
trackinfo
.
dwFlags
&
flags
)
!=
flags
||
trackinfo
.
hwndTrack
!=
infoPtr
->
hwndSelf
)
{
trackinfo
.
dwFlags
=
flags
;
trackinfo
.
dwHoverTime
=
infoPtr
->
dwHoverTime
;
trackinfo
.
hwndTrack
=
infoPtr
->
hwndSelf
;
...
...
dlls/comctl32/tests/listview.c
View file @
4dd26ee8
...
...
@@ -5745,6 +5745,46 @@ static void test_header_proc(void)
DestroyWindow
(
hwnd
);
}
static
void
test_oneclickactivate
(
void
)
{
char
item1
[]
=
"item1"
;
LVITEMA
item
;
HWND
hwnd
,
fg
;
INT
r
;
hwnd
=
CreateWindowExA
(
0
,
"SysListView32"
,
"foo"
,
WS_VISIBLE
|
WS_CHILD
|
LVS_LIST
,
10
,
10
,
100
,
200
,
hwndparent
,
NULL
,
NULL
,
NULL
);
ok
(
hwnd
!=
NULL
,
"failed to create listview window
\n
"
);
r
=
SendMessageA
(
hwnd
,
LVM_SETEXTENDEDLISTVIEWSTYLE
,
0
,
LVS_EX_ONECLICKACTIVATE
);
ok
(
r
==
0
,
"should return zero
\n
"
);
SetForegroundWindow
(
hwndparent
);
fg
=
GetForegroundWindow
();
if
(
fg
!=
hwndparent
)
{
skip
(
"Window is not in the foreground. Skipping oneclickactivate tests.
\n
"
);
DestroyWindow
(
hwnd
);
return
;
}
item
.
mask
=
LVIF_TEXT
;
item
.
iItem
=
0
;
item
.
iSubItem
=
0
;
item
.
iImage
=
0
;
item
.
pszText
=
item1
;
r
=
SendMessageA
(
hwnd
,
LVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
item
);
ok
(
r
==
0
,
"should not fail
\n
"
);
r
=
SendMessageA
(
hwnd
,
LVM_GETSELECTEDCOUNT
,
0
,
0
);
expect
(
0
,
r
);
r
=
SendMessageA
(
hwnd
,
WM_MOUSEHOVER
,
MAKELONG
(
1
,
1
),
0
);
expect
(
0
,
r
);
r
=
SendMessageA
(
hwnd
,
LVM_GETSELECTEDCOUNT
,
0
,
0
);
expect
(
1
,
r
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
listview
)
{
HMODULE
hComctl32
;
...
...
@@ -5814,6 +5854,7 @@ START_TEST(listview)
test_deleteitem
();
test_insertitem
();
test_header_proc
();
test_oneclickactivate
();
if
(
!
load_v6_module
(
&
ctx_cookie
,
&
hCtx
))
{
...
...
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