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:
@@ -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);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user