From 71e465210d5491a5805a26a855232bc103ab0215 Mon Sep 17 00:00:00 2001 From: Felipe Kinoshita Date: Fri, 25 Jun 2021 00:56:39 -0300 Subject: [PATCH 3/7] Assing first screen if `screen` is null BUG: 438277 (cherry picked from commit 60ab32584b3322b384342e1bb784c07123d4ad7b) --- klipper/klipperpopup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klipper/klipperpopup.cpp b/klipper/klipperpopup.cpp index 390235b4d..0eacc18e2 100644 --- a/klipper/klipperpopup.cpp +++ b/klipper/klipperpopup.cpp @@ -86,7 +86,7 @@ KlipperPopup::KlipperPopup(History *history) QRect geometry = windowInfo.geometry(); QScreen *screen = QGuiApplication::screenAt(geometry.center()); if (screen == nullptr) { - return; + screen = QGuiApplication::screens()[0]; } int menuHeight = (screen->geometry().height()) * 3 / 4; int menuWidth = (screen->geometry().width()) * 1 / 3; -- 2.31.1