tcausby / giver

Automatically exported from code.google.com/p/giver
MIT License
0 stars 1 forks source link

TrayIcon does not disappear from notification area on Windows at exit (Patch). #26

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Windows is a little fussy, particularly with tray icons, and will leave the 
icon showing until forced to repaint that area of the screen unless the 
icon is hidden at exit time.

The attached patch simple hides and disposes the TrayIcon in the 
Application class in the Quit() call.  Unfortunately I haven't been able to 
test this under Mono/Linux) to make sure there are no side-effects there. 
Sorry.

Original issue reported on code.google.com by rossdjo...@gmail.com on 19 Apr 2009 at 10:08

Attachments:

GoogleCodeExporter commented 8 years ago
This probably works fine in Linux, as we use a similar approach for Tomboy (not 
sure
if we do the Dispose, though).

Original comment by sanforda...@gmail.com on 20 Apr 2009 at 12:58

GoogleCodeExporter commented 8 years ago
I don't think the Dispose() is technically necessary at this stage, as the 
application is shutting down and releasing resources is pointless *if* the end 
of 
process correctly releases all of the resources and doesn't leak handles. 

Windows has not inspired a huge level of trust with me, hence my proclivity for 
always calling Dispose(), or using(){} ;)

Original comment by rossdjo...@gmail.com on 20 Apr 2009 at 11:11