From 7cb2a10eb8dfc7b12b66351cf130397b3604afc1 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Mon, 15 Mar 2021 18:35:58 +0100 Subject: [PATCH] Amend 635a7d77 With a multiscreen setup and Qt6, make sure to get the geometry of the screen containing the widget. --- src/frontends/qt/IconPalette.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt/IconPalette.cpp b/src/frontends/qt/IconPalette.cpp index 3c5eb7a546..8956a48c96 100644 --- a/src/frontends/qt/IconPalette.cpp +++ b/src/frontends/qt/IconPalette.cpp @@ -27,6 +27,7 @@ #include #include #include +#include namespace lyx { namespace frontend { @@ -181,7 +182,7 @@ void IconPalette::showEvent(QShowEvent * /*event*/) #if QT_VERSION < 0x060000 QRect const screen = qApp->desktop()->availableGeometry(this); #else - QRect const screen = qApp->primaryScreen()->availableGeometry(); + QRect const screen = window()->windowHandle()->screen()->availableGeometry(); #endif QPoint const gpos = parentWidget()->mapToGlobal( parentWidget()->geometry().bottomLeft());