From d377f14fd5b4fe3ed64392c6b743bac395f9f891 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 7 Nov 2016 11:28:16 +0100 Subject: Windows QPA: Detect Windows 10 tablet mode Add new file for dynamically loading Window 10 Helpers via combase.dll and add function qt_windowsIsTabletMode() querying UIViewSettings::get_UserInteractionMode() for "Touch" mode. The style hint QPlatformIntegration::ShowIsMaximized will then reflect the tablet mode setting. Task-number: QTBUG-56831 Change-Id: Ia361dd172fcf0e54fdfc70863c43527f3ea72fe2 Reviewed-by: Oliver Wolff Reviewed-by: Maurice Kalinowski --- src/plugins/platforms/windows/qwindowsintegration.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/plugins/platforms/windows/qwindowsintegration.cpp') diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 004b03d9a9..f49ad0e767 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -41,6 +41,7 @@ #include "qwindowsintegration.h" #include "qwindowswindow.h" #include "qwindowscontext.h" +#include "qwin10helpers.h" #include "qwindowsopenglcontext.h" #include "qwindowsscreen.h" @@ -509,6 +510,12 @@ QVariant QWindowsIntegration::styleHint(QPlatformIntegration::StyleHint hint) co #ifdef SPI_GETKEYBOARDSPEED case KeyboardAutoRepeatRate: return QVariant(keyBoardAutoRepeatRateMS()); +#endif + case QPlatformIntegration::ShowIsMaximized: +#ifndef QT_NO_CLIPBOARD + return qt_windowsIsTabletMode(d->m_clipboard.clipboardViewer()); +#else + break; #endif case QPlatformIntegration::StartDragTime: case QPlatformIntegration::StartDragDistance: -- cgit v1.2.3