Skip to content

Commit

Permalink
fix windows doing offscreen when attached on wayland (#7592)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpomJ authored Nov 21, 2024
1 parent 9961644 commit adce178
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/SubWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "SubWindow.h"

#include <QGraphicsDropShadowEffect>
#include <QGuiApplication>
#include <QLabel>
#include <QMdiArea>
#include <QMetaMethod>
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit adce178

Please sign in to comment.