summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qhighdpiscaling.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-11-15 09:51:41 +0100
committerLiang Qi <liang.qi@qt.io>2016-11-15 09:58:16 +0100
commit9808b53fde1dfc65ad3757cc6720e430c3cc89a2 (patch)
treea0517ae1e290e7bbdb118c9f01f4e6e5d744998c /src/gui/kernel/qhighdpiscaling.cpp
parentc214379156e4c75dcfe59cf73d69b912f4293303 (diff)
parent246fe271878dbe586b5f3222a78d67dfecd1ca83 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: configure src/plugins/platforms/eglfs/qeglfsintegration.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp Change-Id: Id2da7c775439adb62646d5b741ee7c638042b34b
Diffstat (limited to 'src/gui/kernel/qhighdpiscaling.cpp')
-rw-r--r--src/gui/kernel/qhighdpiscaling.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp
index fccd81f8e8..7ac876838d 100644
--- a/src/gui/kernel/qhighdpiscaling.cpp
+++ b/src/gui/kernel/qhighdpiscaling.cpp
@@ -342,8 +342,10 @@ static const char scaleFactorProperty[] = "_q_scaleFactor";
*/
void QHighDpiScaling::setScreenFactor(QScreen *screen, qreal factor)
{
- m_screenFactorSet = true;
- m_active = true;
+ if (!qFuzzyCompare(factor, qreal(1))) {
+ m_screenFactorSet = true;
+ m_active = true;
+ }
screen->setProperty(scaleFactorProperty, QVariant(factor));
// hack to force re-evaluation of screen geometry