summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandscreen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandscreen.cpp')
-rw-r--r--src/client/qwaylandscreen.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp
index 892ef974b..38d61f88c 100644
--- a/src/client/qwaylandscreen.cpp
+++ b/src/client/qwaylandscreen.cpp
@@ -123,11 +123,15 @@ QSizeF QWaylandScreen::physicalSize() const
QDpi QWaylandScreen::logicalDpi() const
{
- static int force_dpi = !qgetenv("QT_WAYLAND_FORCE_DPI").isEmpty() ? qgetenv("QT_WAYLAND_FORCE_DPI").toInt() : -1;
- if (force_dpi > 0)
- return QDpi(force_dpi, force_dpi);
+ static bool physicalDpi = qEnvironmentVariable("QT_WAYLAND_FORCE_DPI") == QStringLiteral("physical");
+ if (physicalDpi)
+ return QPlatformScreen::logicalDpi();
- return QPlatformScreen::logicalDpi();
+ static int forceDpi = qgetenv("QT_WAYLAND_FORCE_DPI").toInt();
+ if (forceDpi)
+ return QDpi(forceDpi, forceDpi);
+
+ return QDpi(96, 96);
}
QList<QPlatformScreen *> QWaylandScreen::virtualSiblings() const