summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qtwindowsglobal.h
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2013-09-18 11:49:05 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-21 07:45:44 +0200
commitac0bacc8afc2f0ed3e1e1a19bdb469f8a4ec557e (patch)
tree0bd9aa7905840d46b968dd08b9e59c1474c78157 /src/plugins/platforms/windows/qtwindowsglobal.h
parent2b65bba77d4705d49a01a25350de64d153808504 (diff)
Port of Qt 4's Windows session management
This patch aims to implement the session management for Windows. Based on the Qt 4 QApplication windows specific code Task-number: QTBUG-28228 Task-number: QTBUG-33032 Change-Id: I7059298ad9661aebd51e77a03f55a7a04f461479 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qtwindowsglobal.h')
-rw-r--r--src/plugins/platforms/windows/qtwindowsglobal.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qtwindowsglobal.h b/src/plugins/platforms/windows/qtwindowsglobal.h
index e9eb50799e..ee5b6189b2 100644
--- a/src/plugins/platforms/windows/qtwindowsglobal.h
+++ b/src/plugins/platforms/windows/qtwindowsglobal.h
@@ -1,5 +1,6 @@
/****************************************************************************
**
+** Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch>
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
@@ -98,6 +99,8 @@ enum WindowsEventType // Simplify event types
ActivateApplicationEvent = ApplicationEventFlag + 1,
DeactivateApplicationEvent = ApplicationEventFlag + 2,
AccessibleObjectFromWindowRequest = ApplicationEventFlag + 3,
+ QueryEndSessionApplicationEvent = ApplicationEventFlag + 4,
+ EndSessionApplicationEvent = ApplicationEventFlag + 5,
InputMethodStartCompositionEvent = InputMethodEventFlag + 1,
InputMethodCompositionEvent = InputMethodEventFlag + 2,
InputMethodEndCompositionEvent = InputMethodEventFlag + 3,
@@ -214,6 +217,12 @@ inline QtWindows::WindowsEventType windowsEventType(UINT message, WPARAM wParamI
return QtWindows::WhatsThisEvent;
#endif
break;
+#if !defined(Q_OS_WINCE) && !defined(QT_NO_SESSIONMANAGER)
+ case WM_QUERYENDSESSION:
+ return QtWindows::QueryEndSessionApplicationEvent;
+ case WM_ENDSESSION:
+ return QtWindows::EndSessionApplicationEvent;
+#endif
default:
break;
}