fixed return value of HandleEndSession to return true only if the message was really processed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-08-25 17:56:34 +00:00
parent 52e8b69060
commit 519dc37faf

View 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);
}
// ---------------------------------------------------------------------------