From 933e3e886fe51cc1feb542615b4700294182cc47 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 2 Sep 2015 06:26:04 +0200 Subject: Windows: Do not set process DPI awareness when Qt runs in a plugin. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Disable the call depending on Qt::AA_PluginApplication. Task-number: QTBUG-47556 Change-Id: Id50a09d99a9e1fb4f57d85798a7554e124cfafa5 Reviewed-by: Tim Blechmann Reviewed-by: Jan Arve Sæther --- src/plugins/platforms/windows/qwindowsintegration.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index f97c23c207..081a800913 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -220,11 +220,13 @@ QWindowsIntegrationPrivate::QWindowsIntegrationPrivate(const QStringList ¶mL if (tabletAbsoluteRange >= 0) m_context.setTabletAbsoluteRange(tabletAbsoluteRange); if (!dpiAwarenessSet) { // Set only once in case of repeated instantiations of QGuiApplication. - m_context.setProcessDpiAwareness(dpiAwareness); + if (!QCoreApplication::testAttribute(Qt::AA_PluginApplication)) { + m_context.setProcessDpiAwareness(dpiAwareness); + qCDebug(lcQpaWindows) + << __FUNCTION__ << "DpiAwareness=" << dpiAwareness; + } dpiAwarenessSet = true; } - qCDebug(lcQpaWindows) - << __FUNCTION__ << "DpiAwareness=" << dpiAwareness; QTouchDevice *touchDevice = m_context.touchDevice(); if (touchDevice) { -- cgit v1.2.3