summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp
index 8850d8cdd4..689624ff2a 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.cpp
+++ b/src/plugins/platforms/windows/qwindowsscreen.cpp
@@ -51,6 +51,7 @@
#include <QtGui/qguiapplication.h>
#include <qpa/qwindowsysteminterface.h>
#include <private/qhighdpiscaling_p.h>
+#include <private/qwindowsfontdatabasebase_p.h>
#include <QtGui/qscreen.h>
#include <QtCore/qdebug.h>
@@ -111,8 +112,11 @@ static bool monitorData(HMONITOR hMonitor, QWindowsScreenData *data)
// EnumDisplayMonitors (as opposed to EnumDisplayDevices) enumerates only
// virtual desktop screens.
data->flags |= QWindowsScreenData::VirtualDesktop;
- if (info.dwFlags & MONITORINFOF_PRIMARY)
+ if (info.dwFlags & MONITORINFOF_PRIMARY) {
data->flags |= QWindowsScreenData::PrimaryScreen;
+ if ((data->flags & QWindowsScreenData::LockScreen) == 0)
+ QWindowsFontDatabase::setDefaultVerticalDPI(data->dpi.second);
+ }
return true;
}