diff options
Diffstat (limited to 'src/client/qwaylandwindow.cpp')
-rw-r--r-- | src/client/qwaylandwindow.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index f32a487e6..1fb5c3f83 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -1031,6 +1031,8 @@ void QWaylandWindow::setWindowFlags(Qt::WindowFlags flags) bool QWaylandWindow::createDecoration() { + Q_ASSERT_X(QThread::currentThreadId() == QThreadData::get2(thread())->threadId.loadRelaxed(), + "QWaylandWindow::createDecoration", "not called from main thread"); if (!mDisplay->supportsWindowDecoration()) return false; @@ -1111,11 +1113,7 @@ 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. - // 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); + window()->requestUpdate(); } return mWindowDecoration; |