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 )
|
if ( !endSession )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
// only send once
|
||||||
|
if ( (this != wxTheApp->GetTopWindow()) )
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
wxCloseEvent event(wxEVT_END_SESSION, -1);
|
wxCloseEvent event(wxEVT_END_SESSION, -1);
|
||||||
event.SetEventObject(wxTheApp);
|
event.SetEventObject(wxTheApp);
|
||||||
event.SetCanVeto(FALSE);
|
event.SetCanVeto(FALSE);
|
||||||
event.SetLoggingOff( (logOff == (long)ENDSESSION_LOGOFF) );
|
event.SetLoggingOff( (logOff == (long)ENDSESSION_LOGOFF) );
|
||||||
if ( (this == wxTheApp->GetTopWindow()) && // Only send once
|
|
||||||
wxTheApp->ProcessEvent(event))
|
return wxTheApp->ProcessEvent(event);
|
||||||
{
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user