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
425fd8f8
Commit
425fd8f8
authored
Jun 28, 2022
by
Angelo Haller
Committed by
Alexandre Julliard
Aug 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Move sending LVN_ODSTATECHANGED notifications to a function.
Signed-off-by:
Angelo Haller
<
angelo@szanni.org
>
parent
8b392553
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
listview.c
dlls/comctl32/listview.c
+18
-7
No files found.
dlls/comctl32/listview.c
View file @
425fd8f8
...
...
@@ -438,6 +438,7 @@ static INT LISTVIEW_GetStringWidthT(const LISTVIEW_INFO *, LPCWSTR, BOOL);
static
BOOL
LISTVIEW_KeySelection
(
LISTVIEW_INFO
*
,
INT
,
BOOL
);
static
UINT
LISTVIEW_GetItemState
(
const
LISTVIEW_INFO
*
,
INT
,
UINT
);
static
BOOL
LISTVIEW_SetItemState
(
LISTVIEW_INFO
*
,
INT
,
const
LVITEMW
*
);
static
VOID
LISTVIEW_SetOwnerDataState
(
LISTVIEW_INFO
*
,
INT
,
INT
,
const
LVITEMW
*
);
static
LRESULT
LISTVIEW_VScroll
(
LISTVIEW_INFO
*
,
INT
,
INT
);
static
LRESULT
LISTVIEW_HScroll
(
LISTVIEW_INFO
*
,
INT
,
INT
);
static
BOOL
LISTVIEW_EnsureVisible
(
LISTVIEW_INFO
*
,
INT
,
BOOL
);
...
...
@@ -3565,7 +3566,6 @@ static BOOL LISTVIEW_AddGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem)
INT
nFirst
=
min
(
infoPtr
->
nSelectionMark
,
nItem
);
INT
nLast
=
max
(
infoPtr
->
nSelectionMark
,
nItem
);
HWND
hwndSelf
=
infoPtr
->
hwndSelf
;
NMLVODSTATECHANGE
nmlv
;
DWORD
old_mask
;
LVITEMW
item
;
INT
i
;
...
...
@@ -3587,13 +3587,8 @@ static BOOL LISTVIEW_AddGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem)
for
(
i
=
nFirst
;
i
<=
nLast
;
i
++
)
LISTVIEW_SetItemState
(
infoPtr
,
i
,
&
item
);
ZeroMemory
(
&
nmlv
,
sizeof
(
nmlv
));
nmlv
.
iFrom
=
nFirst
;
nmlv
.
iTo
=
nLast
;
nmlv
.
uOldState
=
0
;
nmlv
.
uNewState
=
item
.
state
;
LISTVIEW_SetOwnerDataState
(
infoPtr
,
nFirst
,
nLast
,
&
item
);
notify_hdr
(
infoPtr
,
LVN_ODSTATECHANGED
,
(
LPNMHDR
)
&
nmlv
);
if
(
!
IsWindow
(
hwndSelf
))
return
FALSE
;
infoPtr
->
notify_mask
|=
old_mask
;
...
...
@@ -9023,6 +9018,22 @@ static BOOL LISTVIEW_SetItemPosition(LISTVIEW_INFO *infoPtr, INT nItem, const PO
return
LISTVIEW_MoveIconTo
(
infoPtr
,
nItem
,
&
Pt
,
FALSE
);
}
/* Make sure to also disable per item notifications via the notification mask. */
static
VOID
LISTVIEW_SetOwnerDataState
(
LISTVIEW_INFO
*
infoPtr
,
INT
nFirst
,
INT
nLast
,
const
LVITEMW
*
item
)
{
NMLVODSTATECHANGE
nmlv
;
if
(
!
item
)
return
;
ZeroMemory
(
&
nmlv
,
sizeof
(
nmlv
));
nmlv
.
iFrom
=
nFirst
;
nmlv
.
iTo
=
nLast
;
nmlv
.
uOldState
=
0
;
nmlv
.
uNewState
=
item
->
state
;
notify_hdr
(
infoPtr
,
LVN_ODSTATECHANGED
,
(
LPNMHDR
)
&
nmlv
);
}
/***
* DESCRIPTION:
* Sets the state of one or many items.
...
...
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