From: <ah...@us...> - 2013-05-25 13:11:33
|
Revision: 13520 http://jvcl.svn.sourceforge.net/jvcl/?rev=13520&view=rev Author: ahuser Date: 2013-05-25 13:11:27 +0000 (Sat, 25 May 2013) Log Message: ----------- Mantis 6133: JvTrayIcon prevents application from closing with FormCloseQuery() Modified Paths: -------------- trunk/jvcl/run/JvTrayIcon.pas Modified: trunk/jvcl/run/JvTrayIcon.pas =================================================================== --- trunk/jvcl/run/JvTrayIcon.pas 2013-05-25 13:08:38 UTC (rev 13519) +++ trunk/jvcl/run/JvTrayIcon.pas 2013-05-25 13:11:27 UTC (rev 13520) @@ -182,7 +182,7 @@ procedure DoMouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure DoDoubleClick(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure DoClick(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); - procedure doOnQueryEndSession; + procedure DoOnQueryEndSession; function ApplicationHook(var Msg: TMessage): Boolean; function NotifyIcon(uFlags: UINT; dwMessage: DWORD): Boolean; procedure SetCurrentIcon(Value: TIcon); //HEG: New @@ -826,7 +826,7 @@ DoContextPopup(X, Y); end; -procedure TJvTrayIcon.doOnQueryEndSession; +procedure TJvTrayIcon.DoOnQueryEndSession; begin if Assigned(FOnQueryEndSession) then FOnQueryEndSession(Self); @@ -1489,14 +1489,8 @@ end; WM_QUERYENDSESSION: begin - doOnQueryEndSession; - // Add by Winston Feng 2003-9-28 - // Handle the QueryEndSession and TaskbarCreated message, so trayicon - // will be deleted and restored correctly. - // For D2009 and above, we must let the default window proc handle it. - {$IFNDEF DELPHI2009_UP} - Result := 1; - {$ENDIF ~DELPHI2009_UP} + DoOnQueryEndSession; + Result := DefWindowProc(FHandle, Msg, WParam, LParam); end; WM_ENDSESSION: // (rb) Is it really necessairy to respond to WM_ENDSESSION? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |