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
9024c107
Commit
9024c107
authored
Jul 23, 2000
by
Aric Stewart
Committed by
Alexandre Julliard
Jul 23, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle the case where the function SetItem is called to select an item
or set its focus.
parent
fddc3e15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
4 deletions
+34
-4
listview.c
dlls/comctl32/listview.c
+34
-4
No files found.
dlls/comctl32/listview.c
View file @
9024c107
...
...
@@ -1204,10 +1204,16 @@ static BOOL LISTVIEW_SetItemFocus(HWND hwnd, INT nItem)
if
(
infoPtr
->
nFocusedItem
!=
nItem
)
{
bResult
=
TRUE
;
ZeroMemory
(
&
lvItem
,
sizeof
(
LVITEMA
));
lvItem
.
stateMask
=
LVIS_FOCUSED
;
ListView_SetItemState
(
hwnd
,
infoPtr
->
nFocusedItem
,
&
lvItem
);
if
(
infoPtr
->
nFocusedItem
>=
0
)
{
INT
oldFocus
=
infoPtr
->
nFocusedItem
;
bResult
=
TRUE
;
infoPtr
->
nFocusedItem
=
-
1
;
ZeroMemory
(
&
lvItem
,
sizeof
(
LVITEMA
));
lvItem
.
stateMask
=
LVIS_FOCUSED
;
ListView_SetItemState
(
hwnd
,
oldFocus
,
&
lvItem
);
}
lvItem
.
state
=
LVIS_FOCUSED
;
lvItem
.
stateMask
=
LVIS_FOCUSED
;
...
...
@@ -1931,6 +1937,30 @@ static BOOL LISTVIEW_SetItem(HWND hwnd, LPLVITEMA lpLVItem)
{
nmlv
.
uNewState
=
lpLVItem
->
state
&
lpLVItem
->
stateMask
;
nmlv
.
uOldState
=
lpItem
->
state
&
lpLVItem
->
stateMask
;
if
(
nmlv
.
uNewState
&
LVIS_SELECTED
)
{
/*
* This is redundent if called through SetSelection
*
* however is required if the used directly calls SetItem
* to set the selection.
*/
LISTVIEW_RemoveSelections
(
hwnd
,
0
,
lpLVItem
->
iItem
-
1
);
LISTVIEW_RemoveSelections
(
hwnd
,
lpLVItem
->
iItem
+
1
,
GETITEMCOUNT
(
infoPtr
));
}
else
if
(
nmlv
.
uNewState
&
LVIS_FOCUSED
)
{
/*
* This is a fun hoop to jump to try to catch if
* the user is calling us directly to call focuse or if
* this function is being called as a result of a
* SetItemFocuse call.
*/
if
(
infoPtr
->
nFocusedItem
>=
0
)
LISTVIEW_SetItemFocus
(
hwnd
,
lpLVItem
->
iItem
);
}
}
nmlv
.
uChanged
=
uChanged
;
...
...
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