From adce178d2427a412d6e193992fae74a172c7f88c Mon Sep 17 00:00:00 2001 From: SpomJ <75751809+SpomJ@users.noreply.github.com> Date: Thu, 21 Nov 2024 21:38:59 +0300 Subject: [PATCH] fix windows doing offscreen when attached on wayland (#7592) --- src/gui/SubWindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/SubWindow.cpp b/src/gui/SubWindow.cpp index a9b09464c68..533777d32ac 100644 --- a/src/gui/SubWindow.cpp +++ b/src/gui/SubWindow.cpp @@ -29,6 +29,7 @@ #include "SubWindow.h" #include +#include #include #include #include @@ -303,7 +304,10 @@ void SubWindow::attach() // visible first, so that resizing works. QObject obj; connect(&obj, &QObject::destroyed, this, [this, frame]() { - move(mdiArea()->mapFromGlobal(frame.topLeft())); + if (QGuiApplication::platformName() != "wayland") + { // Workaround for wayland reporting on-screen pos as 0-0. If ever solved on wayland side, this check is safe to remove. + move(mdiArea()->mapFromGlobal(frame.topLeft())); + } resize(frame.size()); }, Qt::QueuedConnection); }