From d06d66fad70d7c61559211b6f489b94d1c3a8a05 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 17 Apr 2023 13:37:47 +0200 Subject: QWaylandWindow: Init parent wl_surface when creating subsurface Fixes recreating subsurfaces after hiding and then again showing the window. Pick-to: 6.5 Change-Id: I2e3e7ceb42ec6b25cb64db260dfb74f6ebb10d27 Reviewed-by: David Edmundson --- src/client/qwaylandwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 2b7f199c..7634aedd 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -131,6 +131,8 @@ void QWaylandWindow::initWindow() Q_ASSERT(!mSubSurfaceWindow); auto *parent = static_cast(QPlatformWindow::parent()); + if (!parent->mSurface) + parent->initializeWlSurface(); if (parent->wlSurface()) { if (::wl_subsurface *subsurface = mDisplay->createSubSurface(this, parent)) mSubSurfaceWindow = new QWaylandSubSurface(this, parent, subsurface); -- cgit v1.2.1