summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsintegration.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-02 06:26:04 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-07 08:38:30 +0000
commit933e3e886fe51cc1feb542615b4700294182cc47 (patch)
tree5392db3212fafcdd000fc0455afdc2c59f6cb7a3 /src/plugins/platforms/windows/qwindowsintegration.cpp
parent5237b97f26caa1493128a68f70429292fb422543 (diff)
Windows: Do not set process DPI awareness when Qt runs in a plugin.
Disable the call depending on Qt::AA_PluginApplication. Task-number: QTBUG-47556 Change-Id: Id50a09d99a9e1fb4f57d85798a7554e124cfafa5 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsintegration.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp8
1 files 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 &paramL
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) {