From 29d5c1809ec8c99db48587f97720a19b129e3427 Mon Sep 17 00:00:00 2001
From: Dimitar Tasev <dimitar.tasev@stfc.ac.uk>
Date: Tue, 13 Nov 2018 16:33:59 +0000
Subject: [PATCH] Use QGuiApplication::primaryScreen to retrieve the width, re
 #23814

---
 qt/applications/workbench/workbench/app/mainwindow.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/qt/applications/workbench/workbench/app/mainwindow.py b/qt/applications/workbench/workbench/app/mainwindow.py
index 74ce4f8cd50..ed65fa8d4f6 100644
--- a/qt/applications/workbench/workbench/app/mainwindow.py
+++ b/qt/applications/workbench/workbench/app/mainwindow.py
@@ -38,7 +38,7 @@ requirements.check_qt()
 # Qt
 # -----------------------------------------------------------------------------
 from qtpy.QtCore import (QEventLoop, Qt, QCoreApplication, QPoint, QSize)  # noqa
-from qtpy.QtGui import (QColor, QPixmap)  # noqa
+from qtpy.QtGui import (QColor, QPixmap, QGuiApplication)  # noqa
 from qtpy.QtWidgets import (QApplication, QDesktopWidget, QFileDialog,
                             QMainWindow, QSplashScreen)  # noqa
 from mantidqt.utils.qt import plugins, widget_updates_disabled  # noqa
@@ -87,7 +87,9 @@ atexit.register(qCleanupResources)
 
 
 def _get_splash_image_name():
-    width = QApplication.desktop().availableGeometry().width()
+    # gets the width of the screen where the main window was initialised
+    width = QGuiApplication.primaryScreen().size().width()
+
     if width > 2048:
         return ':/images/MantidSplashScreen_4k.jpg'
     else:
-- 
GitLab