summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandwindow.cpp')
-rw-r--r--src/client/qwaylandwindow.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index df2dcdaa0..5a390434d 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -874,7 +874,11 @@ bool QWaylandWindow::createDecoration()
// size and are not redrawn, leaving the new buffer empty. As a simple
// work-around, we trigger a full extra update whenever the client-side
// window decorations are toggled while the window is showing.
- window()->requestUpdate();
+ // Note: createDecoration() is sometimes called from the render thread
+ // of Qt Quick. This is essentially wrong and could potentially cause problems,
+ // but until the underlying issue has been fixed, we have to use invokeMethod()
+ // here to avoid asserts.
+ QMetaObject::invokeMethod(window(), &QWindow::requestUpdate);
}
return mWindowDecoration;
@@ -1277,3 +1281,5 @@ void QWaylandWindow::setOpaqueArea(const QRegion &opaqueArea)
}
QT_END_NAMESPACE
+
+#include "moc_qwaylandwindow_p.cpp"