From a9433f46e873baf2319bdb934012b9eca4499721 Mon Sep 17 00:00:00 2001 From: Inho Lee Date: Mon, 1 Nov 2021 14:23:58 +0100 Subject: Do not create decorations when the shellSurface is not ready A cases reported that client windows try to make decorations when their shell surfaces are null. Since the surfaces' requests for decorations should be applied, those case will be failed to create decorations. This patch was modified by Paul Tvete's advice. (paul.tvete@qt.io) Task-number: QTBUG-97608 Change-Id: I2563dbd73b730f81cc411857af07da99ceb2d063 Reviewed-by: Paul Olav Tvete (cherry picked from commit 246f0c0bc01dd059bf8165e81f7b49efa36e4d95) Reviewed-by: Qt Cherry-pick Bot --- src/client/qwaylandwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 746cc4cf..6033f612 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -821,7 +821,7 @@ bool QWaylandWindow::createDecoration() decoration = false; if (mSubSurfaceWindow) decoration = false; - if (mShellSurface && !mShellSurface->wantsDecorations()) + if (!mShellSurface || !mShellSurface->wantsDecorations()) decoration = false; bool hadDecoration = mWindowDecoration; -- cgit v1.2.1