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
9cec74f3
Commit
9cec74f3
authored
Nov 20, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tab: Reset current selection on negative focus value.
parent
33a1e827
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
tab.c
dlls/comctl32/tab.c
+7
-1
tab.c
dlls/comctl32/tests/tab.c
+2
-4
No files found.
dlls/comctl32/tab.c
View file @
9cec74f3
...
...
@@ -269,8 +269,14 @@ static LRESULT TAB_SetCurFocus (TAB_INFO *infoPtr, INT iItem)
{
TRACE
(
"(%p %d)
\n
"
,
infoPtr
,
iItem
);
if
(
iItem
<
0
)
if
(
iItem
<
0
)
{
infoPtr
->
uFocus
=
-
1
;
if
(
infoPtr
->
iSelected
!=
-
1
)
{
infoPtr
->
iSelected
=
-
1
;
TAB_SendSimpleNotify
(
infoPtr
,
TCN_SELCHANGE
);
TAB_InvalidateTabArea
(
infoPtr
);
}
}
else
if
(
iItem
<
infoPtr
->
uNumItem
)
{
if
(
infoPtr
->
dwStyle
&
TCS_BUTTONS
)
{
/* set focus to new item, leave selection as is */
...
...
dlls/comctl32/tests/tab.c
View file @
9cec74f3
...
...
@@ -660,9 +660,7 @@ static void test_curfocus(HWND parent_wnd, INT nTabs)
/* Testing CurFocus with value larger than number of tabs */
focusIndex
=
SendMessage
(
hTab
,
TCM_SETCURSEL
,
1
,
0
);
todo_wine
{
expect
(
-
1
,
focusIndex
);
}
SendMessage
(
hTab
,
TCM_SETCURFOCUS
,
nTabs
+
1
,
0
);
focusIndex
=
SendMessage
(
hTab
,
TCM_GETCURFOCUS
,
0
,
0
);
...
...
@@ -1059,7 +1057,7 @@ static void test_insert_focus(HWND parent_wnd)
expect
(
2
,
r
);
ok_sequence
(
sequences
,
TAB_SEQ_INDEX
,
insert_focus_seq
,
"insert_focus test sequence"
,
FALSE
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_sequence
,
"insert_focus parent test sequence"
,
FALS
E
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_sequence
,
"insert_focus parent test sequence"
,
TRU
E
);
DestroyWindow
(
hTab
);
}
...
...
@@ -1108,7 +1106,7 @@ static void test_delete_focus(HWND parent_wnd)
expect
(
-
1
,
r
);
ok_sequence
(
sequences
,
TAB_SEQ_INDEX
,
delete_focus_seq
,
"delete_focus test sequence"
,
FALSE
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_sequence
,
"delete_focus parent test sequence"
,
FALS
E
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
empty_sequence
,
"delete_focus parent test sequence"
,
TRU
E
);
DestroyWindow
(
hTab
);
}
...
...
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