Add support for tooltips for system tray icons

James Liggett jrliggett at cox.net
Fri Aug 25 14:10:46 CDT 2006


On Fri, 2006-08-25 at 20:19 +0200, Frank Richter wrote:
> Hm, wouldn't it be more economic to try to use one tooltip for all icons?
>From a purely memory-consumption standpoint, yes. But there are still
issues with that. One is that we'd have to handle every mouse event to
see where the cursor is to make sure the tooltip had the right text for
the right icon. Second is the window-rectangle issue. the problem is
that once a tray docks our icon, we basically don't own it, so we don't
know exactly what the tray is going to do with it, and thus we don't
know exactly where the window is going to be, and I don't see a viable
way to find out. Thus, we need to have one tooltip per icon window for
this to work. In fact, there's a small bug in my submitted patch. If you
use it, start one program that uses a tray icon. Then start another
program that uses an icon. Close out the first program so that only the
second icon is left in the tray. You'll notice that the tooltip for this
remaining icon doesn't work anymore, because the window's rectangle
changed behind Explorer's back. My current solution  is to associate
tooltips with whole windows (using the  TTF_IDISHWND flag in the
TTTOOLINFO.uFlags parameter) instead of rectangular areas. This way,
icons' tooltips continue to function even if their positions in the tray
are changed. 

So, to sum up: we can't use one tooltip for every icon ;-)

James




More information about the wine-devel mailing list