mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Amend 635a7d77
With a multiscreen setup and Qt6, make sure to get the geometry of the screen containing the widget.
This commit is contained in:
parent
635a7d77dd
commit
7cb2a10eb8
@ -27,6 +27,7 @@
|
||||
#include <QStyleOptionFrame>
|
||||
#include <QMouseEvent>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWindow>
|
||||
|
||||
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());
|
||||
|
Loading…
Reference in New Issue
Block a user