aboutsummaryrefslogtreecommitdiff
path: root/src/gui/kwindowconfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kwindowconfig.cpp')
-rw-r--r--src/gui/kwindowconfig.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kwindowconfig.cpp b/src/gui/kwindowconfig.cpp
index bb541b8e..4181651f 100644
--- a/src/gui/kwindowconfig.cpp
+++ b/src/gui/kwindowconfig.cpp
@@ -21,7 +21,13 @@ static QString allConnectedScreens()
const auto screens = QGuiApplication::screens();
names.reserve(screens.length());
for (auto screen : screens) {
+#ifdef Q_OS_WIN
+ // QScreen::name() returns garbage on Windows; see https://bugreports.qt.io/browse/QTBUG-74317
+ // So we use the screens' serial numbers to identify them instead
+ names << screen->serialNumber();
+#else
names << screen->name();
+#endif
}
return names.join(QLatin1Char(' '));
}