diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-09-02 06:26:04 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-09-07 08:38:30 +0000 |
commit | 933e3e886fe51cc1feb542615b4700294182cc47 (patch) | |
tree | 5392db3212fafcdd000fc0455afdc2c59f6cb7a3 /src/plugins/platforms | |
parent | 5237b97f26caa1493128a68f70429292fb422543 (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')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsintegration.cpp | 8 |
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 ¶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) { |