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 <paul.tvete@qt.io>
This commit is contained in:
Inho Lee 2021-11-01 14:23:58 +01:00
parent 80600c9f3d
commit 0e198e55a7

View File

@ -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;