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
b68e95ab
Commit
b68e95ab
authored
Jan 11, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Add a special case for deselect all attempt when nothing is selected.
parent
7773d6b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
listview.c
dlls/comctl32/listview.c
+4
-0
listview.c
dlls/comctl32/tests/listview.c
+2
-2
No files found.
dlls/comctl32/listview.c
View file @
b68e95ab
...
...
@@ -8857,6 +8857,10 @@ static BOOL LISTVIEW_SetItemState(LISTVIEW_INFO *infoPtr, INT nItem, const LVITE
UINT
oldstate
=
0
;
BOOL
notify
;
/* special case optimization for recurring attemp to deselect all */
if
(
lvItem
.
state
==
0
&&
lvItem
.
stateMask
==
LVIS_SELECTED
&&
!
LISTVIEW_GetSelectedCount
(
infoPtr
))
return
TRUE
;
/* select all isn't allowed in LVS_SINGLESEL */
if
((
lvItem
.
state
&
lvItem
.
stateMask
&
LVIS_SELECTED
)
&&
(
infoPtr
->
dwStyle
&
LVS_SINGLESEL
))
return
FALSE
;
...
...
dlls/comctl32/tests/listview.c
View file @
b68e95ab
...
...
@@ -2271,7 +2271,7 @@ static void test_multiselect(void)
item
.
state
=
0
;
item
.
stateMask
=
LVIS_SELECTED
;
SendMessageA
(
hwnd
,
LVM_SETITEMSTATE
,
-
1
,
(
LPARAM
)
&
item
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_seq
,
"deselect all notification 2"
,
TRU
E
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_seq
,
"deselect all notification 2"
,
FALS
E
);
/* any non-zero state value does the same */
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
...
...
@@ -3111,7 +3111,7 @@ static void test_ownerdata(void)
res
=
SendMessageA
(
hwnd
,
LVM_SETITEMSTATE
,
-
1
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
res
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_seq
,
"ownerdata deselect all notification"
,
TRU
E
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_seq
,
"ownerdata deselect all notification"
,
FALS
E
);
/* select one, then deselect all */
item
.
stateMask
=
LVIS_SELECTED
;
...
...
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