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
1a25f47d
Commit
1a25f47d
authored
Dec 11, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listbox: Scroll to specified caret index.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
832b748b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
listbox.c
dlls/comctl32/listbox.c
+10
-6
No files found.
dlls/comctl32/listbox.c
View file @
1a25f47d
...
@@ -1462,19 +1462,23 @@ static void LISTBOX_MakeItemVisible( LB_DESCR *descr, INT index, BOOL fully )
...
@@ -1462,19 +1462,23 @@ static void LISTBOX_MakeItemVisible( LB_DESCR *descr, INT index, BOOL fully )
*/
*/
static
LRESULT
LISTBOX_SetCaretIndex
(
LB_DESCR
*
descr
,
INT
index
,
BOOL
fully_visible
)
static
LRESULT
LISTBOX_SetCaretIndex
(
LB_DESCR
*
descr
,
INT
index
,
BOOL
fully_visible
)
{
{
INT
oldfocus
=
descr
->
focus_item
;
BOOL
focus_changed
=
descr
->
focus_item
!=
index
;
TRACE
(
"old focus %d, index %d
\n
"
,
oldfocus
,
index
);
TRACE
(
"old focus %d, index %d
\n
"
,
descr
->
focus_item
,
index
);
if
(
descr
->
style
&
LBS_NOSEL
)
return
LB_ERR
;
if
(
descr
->
style
&
LBS_NOSEL
)
return
LB_ERR
;
if
((
index
<
0
)
||
(
index
>=
descr
->
nb_items
))
return
LB_ERR
;
if
((
index
<
0
)
||
(
index
>=
descr
->
nb_items
))
return
LB_ERR
;
if
(
index
==
oldfocus
)
return
LB_OKAY
;
LISTBOX_DrawFocusRect
(
descr
,
FALSE
);
if
(
focus_changed
)
descr
->
focus_item
=
index
;
{
LISTBOX_DrawFocusRect
(
descr
,
FALSE
);
descr
->
focus_item
=
index
;
}
LISTBOX_MakeItemVisible
(
descr
,
index
,
fully_visible
);
LISTBOX_MakeItemVisible
(
descr
,
index
,
fully_visible
);
LISTBOX_DrawFocusRect
(
descr
,
TRUE
);
if
(
focus_changed
)
LISTBOX_DrawFocusRect
(
descr
,
TRUE
);
return
LB_OKAY
;
return
LB_OKAY
;
}
}
...
...
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