https://bugs.winehq.org/show_bug.cgi?id=41370
Bug ID: 41370 Summary: TTM_GETCURRENTTOOL returns always FALSE when send from TTN_NEEDTEXT handler. Product: Wine Version: 1.9.18 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: comctl32 Assignee: wine-bugs@winehq.org Reporter: johnfound@asm32.info Distribution: ---
It is a tooltip control, created for a toolbar with TBSTYLE_TOOLTIPS style.
The tooltip properly is sending TTN_NEEDTEXT notification, but when trying to determine which tool needs tooltip by sending TTM_GETCURRENTTOOL to the tooltip control it always returns FALSE.
In any other way, the tooltip works fine. For example if I return arbitrary text in the TOOLTIPTEXTW.lpszText field, this text is displayed properly.
In Windows, TTM_GETCURRENTTOOL returns TRUE and filled up TOOLINFO structure about the toolbar that activated the tooltip control.
Here is a link to the procedure that creates the toolbar:
https://fresh.flatassembler.net/fossil/repo/fresh/artifact/63e102f647e4c3119...
Here, the source that handles TTN_NEEDTEXT notification:
https://fresh.flatassembler.net/fossil/repo/fresh/artifact/52e7fb642bba7415e...
The bug is not version specific, because I tried with different stable and development versions and it appears always.
https://bugs.winehq.org/show_bug.cgi?id=41370
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com --- Created attachment 56005 --> https://bugs.winehq.org/attachment.cgi?id=56005 test patch
Hi, John.
Could you test if this patch makes any difference?
https://bugs.winehq.org/show_bug.cgi?id=41370
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal
https://bugs.winehq.org/show_bug.cgi?id=41370
--- Comment #2 from John Found johnfound@asm32.info --- With this patch, TTM_GETCURRENTTOOL returns TRUE as expected, but the TOOLINFO structure does not return any value - the structure is not changed at all after the SendMessage call.
https://bugs.winehq.org/show_bug.cgi?id=41370
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com --- Could you point me to pre-built application that shows this problem?
https://bugs.winehq.org/show_bug.cgi?id=41370
--- Comment #4 from John Found johnfound@asm32.info --- Later this evening I will make some small example, that illustrates the problem (in assembly - sorry), but will make it to print some debug values in order to show the problem.
https://bugs.winehq.org/show_bug.cgi?id=41370
--- Comment #5 from John Found johnfound@asm32.info --- Created attachment 56013 --> https://bugs.winehq.org/attachment.cgi?id=56013 Small test program displaying the bug.
The attachment contains tar.gz with a small test program that illustrates the bug. It contains the source code and precompiled binary. The source code has no dependencies and can be compiled with any version of FASM assembler.
https://bugs.winehq.org/show_bug.cgi?id=41370
--- Comment #6 from John Found johnfound@asm32.info --- I was partially wrong. With the proposed patch, the TOOLINFO structure is partially filled. But the fields TOOLINFO.hwnd and TOOLINFO.uId are still not filled with the proper values.
https://bugs.winehq.org/show_bug.cgi?id=41370
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #56005|0 |1 is obsolete| |
--- Comment #7 from Nikolay Sivov bunglehead@gmail.com --- Created attachment 56016 --> https://bugs.winehq.org/attachment.cgi?id=56016 test patch #2
Ok, thanks. Let's see if this obvious change fixes it for you, haven't tested myself yet.
https://bugs.winehq.org/show_bug.cgi?id=41370
--- Comment #8 from John Found johnfound@asm32.info --- Yes, test patch #2 fixes this bug for me. The code that previously worked only in Windows, now works the same way in WINE. Hope it will not cause some regression.
https://bugs.winehq.org/show_bug.cgi?id=41370
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #9 from winetest@luukku.com --- (In reply to Nikolay Sivov from comment #7)
Created attachment 56016 [details] test patch #2
Ok, thanks. Let's see if this obvious change fixes it for you, haven't tested myself yet.
Patch still applies against wine 2.2-git.
https://bugs.winehq.org/show_bug.cgi?id=41370
--- Comment #10 from winetest@luukku.com --- (In reply to winetest from comment #9)
(In reply to Nikolay Sivov from comment #7)
Created attachment 56016 [details] test patch #2
Ok, thanks. Let's see if this obvious change fixes it for you, haven't tested myself yet.
Patch still applies against wine 2.2-git.
Patch still applies against wine 2.4.
https://bugs.winehq.org/show_bug.cgi?id=41370
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |bunglehead@gmail.com Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #11 from Nikolay Sivov bunglehead@gmail.com --- Confirming.
https://bugs.winehq.org/show_bug.cgi?id=41370
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |6bbea5d074e9543856f5b9cd734 | |bd6716179bf52 Status|NEW |RESOLVED Assignee|bunglehead@gmail.com |wine-bugs@winehq.org Resolution|--- |FIXED
--- Comment #12 from Nikolay Sivov bunglehead@gmail.com --- Marking fixed now - 5312cc6dc298165c855bcb4d49642cd0c8014108, 6bbea5d074e9543856f5b9cd734bd6716179bf52. Please test.
https://bugs.winehq.org/show_bug.cgi?id=41370
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 2.17.