[Bug 38298] New: TTN_SHOW is not implemented correctly
wine-bugs at winehq.org
wine-bugs at winehq.org
Fri Mar 27 14:50:22 CDT 2015
https://bugs.winehq.org/show_bug.cgi?id=38298
Bug ID: 38298
Summary: TTN_SHOW is not implemented correctly
Product: Wine
Version: 1.7.34
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: comctl32
Assignee: wine-bugs at winehq.org
Reporter: pietro10 at mac.com
Distribution: ---
According to MSDN
(https://msdn.microsoft.com/en-us/library/windows/desktop/bb760314%28v=vs.85%29.aspx),
TTN_SHOW in comctl32.dll >= 4.70 has special logic for allowing customization
of tooltip size and position:
Version 4.70. To display the tooltip in its default location, return zero.
To customize the tooltip position, reposition the tooltip window with the
SetWindowPos function and return TRUE.
Note: For versions earlier than 4.70, there is no return value.
This is needed to implement in-place tooltips, such as the ones you get when
you hover the mouse over a listview in report mode (with LVS_EX_LABELTIP) or a
tree view (by default, it seems), or in this picture:
https://i-msdn.sec.s-msft.com/dynimg/IC510747.png.
However, wine currently does not follow these rules. According to
http://source.winehq.org/source/dlls/comctl32/tooltips.c?!v=wine-1.7.39#0621,
it just sends the TTN_SHOW notification, ignoring the return value entirely,
then proceeds to set the default window position anyway. As such, in-place
tooltips will simply appear where they would if they were regular tooltips
(underneath the mouse cursor).
I personally tested with wine 1.7.34 (or some commit around that one) from
source and Windows XP and Windows 7 with my own in-place tooltips as part of a
table control of my own creation. On real Windows, Common Controls 5 and 6 both
have TTN_SHOW working properly (but given it says 4.70 I'm not surprised).
I'm not the first to notice wrong tooltip behavior. Someone (I don't know if
it's just a user or one of the authors of Cardbox) noticed that Cardbox relied
on another aspect of TTN_SHOW that wine doesn't imitate: real Windows computes
the default tooltip position before sending the notification, not after (as
wine still does). In fact, he noticed this back in 2007! I'm not sure why a bug
here was never filed...
https://cardboxeverywhere.wordpress.com/2007/12/11/programming-note-tooltips-again/
I don't have a minimal test program on hand (the source speaks for itself) but
here's something Raymond Chen wrote on the subject that can be constructed into
one: http://blogs.msdn.com/b/oldnewthing/archive/2006/06/26/647365.aspx
Thanks.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list