Windows: Fix return value of WM_QUERYENDSESSION for bogus messages.
LRESULT should be non-zero if the application can quit,
and it is always handled. Improves
97d8e3b200 .
Task-number: QTBUG-35986
Change-Id: I0ad95bc20a5d9e2a52c76bdcdfa986595f6a08d8
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
bb10
parent
fdd8a1b42c
commit
58b928aca8
|
|
@ -971,8 +971,10 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
|||
#if !defined(Q_OS_WINCE) && !defined(QT_NO_SESSIONMANAGER)
|
||||
case QtWindows::QueryEndSessionApplicationEvent: {
|
||||
QWindowsSessionManager *sessionManager = platformSessionManager();
|
||||
if (sessionManager->isActive()) // bogus message from windows
|
||||
if (sessionManager->isActive()) { // bogus message from windows
|
||||
*result = sessionManager->wasCanceled() ? 0 : 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
sessionManager->setActive(true);
|
||||
sessionManager->blocksInteraction();
|
||||
|
|
|
|||
Loading…
Reference in New Issue