From 0e198e55a761d1a7c3414c8eece198c11803de98 Mon Sep 17 00:00:00 2001 From: Inho Lee Date: Mon, 1 Nov 2021 14:23:58 +0100 Subject: [PATCH] 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) Pick-to: 6.2 5.15 Task-number: QTBUG-97608 Change-Id: I2563dbd73b730f81cc411857af07da99ceb2d063 Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/wayland/qwaylandwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 61537c166d7..0cc185522b2 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -859,7 +859,7 @@ bool QWaylandWindow::createDecoration() decoration = false; if (mSubSurfaceWindow) decoration = false; - if (mShellSurface && !mShellSurface->wantsDecorations()) + if (!mShellSurface || !mShellSurface->wantsDecorations()) decoration = false; bool hadDecoration = mWindowDecoration;