summaryrefslogtreecommitdiff
path: root/src/client/qwaylandwindow.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-11-05 07:48:33 +0100
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-11-05 11:35:46 +0100
commitb990f98b44ced37a319d7f476fad7bfb3e070be0 (patch)
tree171a797b6e82a9433e047de7a2ffe475e544a1e8 /src/client/qwaylandwindow.cpp
parentd4ac2c9915fed87193cd2cf7ac438a9fa8edc126 (diff)
parent09474cdf5244ce6fba51a6b01bfe50caf7635c66 (diff)
downloadqtwayland-b990f98b44ced37a319d7f476fad7bfb3e070be0.tar.gz
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts: src/client/qwaylanddisplay.cpp src/client/qwaylandwindow.cpp Change-Id: I30ddf5305b3087b93cf4d6e562fd0146dea61cc0
Diffstat (limited to 'src/client/qwaylandwindow.cpp')
-rw-r--r--src/client/qwaylandwindow.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index bffb5701..950486c0 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -125,9 +125,10 @@ void QWaylandWindow::initWindow()
if (shouldCreateSubSurface()) {
Q_ASSERT(!mSubSurfaceWindow);
- QWaylandWindow *p = static_cast<QWaylandWindow *>(QPlatformWindow::parent());
- if (::wl_subsurface *ss = mDisplay->createSubSurface(this, p)) {
- mSubSurfaceWindow = new QWaylandSubSurface(this, p, ss);
+ auto *parent = static_cast<QWaylandWindow *>(QPlatformWindow::parent());
+ if (parent->wlSurface()) {
+ if (::wl_subsurface *subsurface = mDisplay->createSubSurface(this, parent))
+ mSubSurfaceWindow = new QWaylandSubSurface(this, parent, subsurface);
}
} else if (shouldCreateShellSurface()) {
Q_ASSERT(!mShellSurface);