View Issue Details

IDProjectCategoryView StatusLast Update
0016372LazarusLCLpublic2010-05-01 15:11
ReporterJustin Smyth Assigned ToPaul Ishenin  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.28.3 (SVN) 
Fixed in Version0.9.29 (SVN) 
Summary0016372: TrayIcon goes missing when explorer crashes - no way to restore it.
Descriptionwhen you have TrayIcon showing and explorer crashes (on windows ) and explorer restarts the trayicon goes missing , if you call show it fails to put it back since the internal variable fvisible is set to true and any call to show exits , and if you try to use hide it fails as there is no tray icon to remove and the variable never gets reset.

solution - add a Force Variable to show so if you need to show the tray icon after explorer has crashed it will show it \

Patch Added which fixed this , the force variable is to to a default of False , you only need to call show(true) if you need to override it.
TagsNo tags attached.
Fixed in Revision25093
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

2010-04-30 14:52

 

TrayIcon.patch (1,014 bytes)   
Index: extctrls.pp
===================================================================
--- extctrls.pp	(revision 24721)
+++ extctrls.pp	(working copy)
@@ -1181,7 +1181,7 @@
     constructor Create(TheOwner: TComponent); override;
     destructor Destroy; override;
     function Hide: Boolean;
-    function Show: Boolean;
+    function Show(ForceShow:Boolean = false): Boolean;
     procedure InternalUpdate;
     procedure ShowBalloonHint;
     function GetPosition: TPoint;
Index: include/customtrayicon.inc
===================================================================
--- include/customtrayicon.inc	(revision 24721)
+++ include/customtrayicon.inc	(working copy)
@@ -110,9 +110,9 @@
 *  RETURNS:        If successfull
 *
 *******************************************************************}
-function TCustomTrayIcon.Show: Boolean;
+function TCustomTrayIcon.Show(ForceShow:Boolean): Boolean;
 begin
-  if FVisible then Exit;
+  if Not ForceShow and FVisible then Exit;
 
   FVisible := True;
 
TrayIcon.patch (1,014 bytes)   

Paul Ishenin

2010-05-01 13:26

manager   ~0037138

Sorry, your patch is just a workaround. I made another implementation based on msdn explanations. Please test and close if ok.

Justin Smyth

2010-05-01 15:11

reporter   ~0037140

Fixed. Tested Ok

Issue History

Date Modified Username Field Change
2010-04-30 14:52 Justin Smyth New Issue
2010-04-30 14:52 Justin Smyth File Added: TrayIcon.patch
2010-04-30 14:52 Justin Smyth Widgetset => Win32/Win64
2010-05-01 13:26 Paul Ishenin Fixed in Revision => 25093
2010-05-01 13:26 Paul Ishenin LazTarget => -
2010-05-01 13:26 Paul Ishenin Status new => resolved
2010-05-01 13:26 Paul Ishenin Fixed in Version => 0.9.29 (SVN)
2010-05-01 13:26 Paul Ishenin Resolution open => fixed
2010-05-01 13:26 Paul Ishenin Assigned To => Paul Ishenin
2010-05-01 13:26 Paul Ishenin Note Added: 0037138
2010-05-01 15:11 Justin Smyth Status resolved => closed
2010-05-01 15:11 Justin Smyth Note Added: 0037140