summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Rosca <nowrep@gmail.com>2023-04-17 13:37:47 +0200
committerDavid Rosca <nowrep@gmail.com>2023-04-19 15:52:57 +0200
commitd06d66fad70d7c61559211b6f489b94d1c3a8a05 (patch)
treed89c0b06d0d08d94736493fa6831f35c7d0c45f7 /src
parent45c422a4cba42c6ce8e228677e09ed8997bfc21e (diff)
downloadqtwayland-d06d66fad70d7c61559211b6f489b94d1c3a8a05.tar.gz
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 <davidedmundson@kde.org>
Diffstat (limited to 'src')
-rw-r--r--src/client/qwaylandwindow.cpp2
1 files changed, 2 insertions, 0 deletions
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<QWaylandWindow *>(QPlatformWindow::parent());
+ if (!parent->mSurface)
+ parent->initializeWlSurface();
if (parent->wlSurface()) {
if (::wl_subsurface *subsurface = mDisplay->createSubSurface(this, parent))
mSubSurfaceWindow = new QWaylandSubSurface(this, parent, subsurface);