]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed return value of HandleEndSession to return true only if the message was really...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 25 Aug 2001 17:56:34 +0000 (17:56 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 25 Aug 2001 17:56:34 +0000 (17:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 6be083a03d69027fe980b1bfa98f0b4759b33416..c9a9494c0e4d6251d0465d09a5e0acd424cbf32f 100644 (file)
@@ -3024,15 +3024,16 @@ bool wxWindowMSW::HandleEndSession(bool endSession, long logOff)
     if ( !endSession )
         return FALSE;
 
+    // only send once
+    if ( (this != wxTheApp->GetTopWindow()) )
+        return FALSE;
+
     wxCloseEvent event(wxEVT_END_SESSION, -1);
     event.SetEventObject(wxTheApp);
     event.SetCanVeto(FALSE);
     event.SetLoggingOff( (logOff == (long)ENDSESSION_LOGOFF) );
-    if ( (this == wxTheApp->GetTopWindow()) && // Only send once
-        wxTheApp->ProcessEvent(event))
-    {
-    }
-    return TRUE;
+
+    return wxTheApp->ProcessEvent(event);
 }
 
 // ---------------------------------------------------------------------------