diff options
author | Marco Martin <notmart@gmail.com> | 2023-02-24 17:40:48 +0100 |
---|---|---|
committer | David Edmundson <davidedmundson@kde.org> | 2023-02-27 10:07:47 +0000 |
commit | 9858708993906f7a449c127b6c1f24ccae7ed453 (patch) | |
tree | 97d669307ae145d9adc9ab998e714ea4c2bccf00 /src/client | |
parent | 5703d0a242aef9402d4b72ab50fe336f453e49fd (diff) | |
download | qtwayland-9858708993906f7a449c127b6c1f24ccae7ed453.tar.gz |
client: Force a roundtrip when an XdgOutput is not ready yet
Is possible that the server sends a surface_enter before
all the information of the XdgOutput have been processed by the client.
in this case the associated QScreen doesn't exist yet, causing a
QWindow::SetScreen(nullptr), which will fall back to
QGuiApplication::primaryScreen(), having the QWindow being assigned the
wrong screen
Change-Id: I923d5d3a35484deafa6f0572f79c16c27b1f87f0
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/qwaylandwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index a109126d..954d6df3 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -1306,6 +1306,8 @@ void QWaylandWindow::handleScreensChanged() if (newScreen == mLastReportedScreen) return; + if (!newScreen->isPlaceholder() && !newScreen->QPlatformScreen::screen()) + mDisplay->forceRoundTrip(); QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->QPlatformScreen::screen()); mLastReportedScreen = newScreen; |