systray[1/4]: rewrite tooltips support

Kirill K. Smirnov lich at
Wed Feb 6 16:34:15 CST 2008

> Please explain better what you are doing, "rewrite tooltips support"
> doesn't say what is changing or why the change is needed (and "rewrite"
> is an exaggeration, you are mostly just moving code around).

  The main issue this patch fixes is an "attempt to set/modify a tooltip to a 
nonexistent window". This may happen when application modifies tip text while 
icon is hidden (e.g. when adding initially disabled icon with tooltip).

  The change I did:
1) Store tip text in the icon structure.
2) Move tooltip creation code  to the separate function.
3) Immediately bind tooltip to icon window at creation. We can bind empty 
tooltip text with icon window and further just update text when needed.  
4) set_tooltip function was renamed to update_tooltip_text and simplified.

Since tooltip support code is relatively small, this was enough for me to 
exaggeratedly proclaim tooltip support be rewritten ;-)

So this ChangeLog is better:
  Avoid modifying non-existent tooltip windows of non-existent icon windows 
when application updates tip of hidden icon.


More information about the wine-devel mailing list