From 97d8e3b2007abf7b14b4ccbfbbc4abdeef712bcf Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 10 Feb 2014 17:54:44 +0100 Subject: Windows: Fix return value of WM_QUERYENDSESSION. LRESULT should be non-zero if the application can quit, and it is always handled. Task-number: QTBUG-35986 Change-Id: Ic8b0ecc731d3efaf94e2a62491918d379fe59f5c Reviewed-by: Joerg Bornemann --- src/plugins/platforms/windows/qwindowscontext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 8380aba13b..b69ec1e30f 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -969,7 +969,8 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, if (lParam & ENDSESSION_LOGOFF) fflush(NULL); - return !sessionManager->wasCanceled(); + *result = sessionManager->wasCanceled() ? 0 : 1; + return true; } case QtWindows::EndSessionApplicationEvent: { QWindowsSessionManager *sessionManager = platformSessionManager(); -- cgit v1.2.3