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
4c572329
Commit
4c572329
authored
Jan 19, 2018
by
Thomas Faber
Committed by
Alexandre Julliard
Jan 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Unset the toolbar's hot item when deleting a button.
Signed-off-by:
Thomas Faber
<
thomas.faber@reactos.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0b8219da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
toolbar.c
dlls/comctl32/tests/toolbar.c
+10
-0
toolbar.c
dlls/comctl32/toolbar.c
+1
-0
No files found.
dlls/comctl32/tests/toolbar.c
View file @
4c572329
...
...
@@ -923,6 +923,16 @@ static void test_hotitem(void)
ok
(
ret
==
1
,
"TB_GETHOTITEM returned %ld, expected 1
\n
"
,
ret
);
ok
(
g_fReceivedHotItemChange
==
FALSE
,
"Unexpected TBN_HOTITEMCHANGE
\n
"
);
/* deleting a button unsets the hot item */
ret
=
SendMessageA
(
hToolbar
,
TB_SETHOTITEM
,
0
,
0
);
ok
(
ret
==
1
,
"TB_SETHOTITEM returned %ld, expected 1
\n
"
,
ret
);
g_fReceivedHotItemChange
=
FALSE
;
ret
=
SendMessageA
(
hToolbar
,
TB_DELETEBUTTON
,
1
,
0
);
ok
(
ret
==
TRUE
,
"TB_DELETEBUTTON returned %ld, expected TRUE
\n
"
,
ret
);
ret
=
SendMessageA
(
hToolbar
,
TB_GETHOTITEM
,
0
,
0
);
ok
(
ret
==
-
1
,
"TB_GETHOTITEM returned %ld, expected -1
\n
"
,
ret
);
ok
(
g_fReceivedHotItemChange
==
FALSE
,
"Unexpected TBN_HOTITEMCHANGE
\n
"
);
DestroyWindow
(
hToolbar
);
}
...
...
dlls/comctl32/toolbar.c
View file @
4c572329
...
...
@@ -3233,6 +3233,7 @@ TOOLBAR_DeleteButton (TOOLBAR_INFO *infoPtr, INT nIndex)
TOOLBAR_TooltipDelTool
(
infoPtr
,
&
infoPtr
->
buttons
[
nIndex
]);
infoPtr
->
nHotItem
=
-
1
;
if
(
infoPtr
->
nNumButtons
==
1
)
{
TRACE
(
" simple delete
\n
"
);
free_string
(
infoPtr
->
buttons
);
...
...
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