summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandquickwlshellsurfaceitem.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@theqtcompany.com>2016-04-11 12:51:21 +0200
committerJohan Helsing <johan.helsing@theqtcompany.com>2016-04-11 15:49:02 +0000
commit44f4395879ec9464c0a6dd3a7635fad05ad14118 (patch)
treea65a7eda1c4aac7101eedd42787c0483e442101b /src/compositor/extensions/qwaylandquickwlshellsurfaceitem.cpp
parentf2e42b438d221ab007e9d3a0cbac1d34634b66e6 (diff)
Simplify ShellSurfaceItem creationv5.7.0-beta1
Use onShellSurfaceCreated instead of onCreateShellSurface. A QWaylandWlShellSurface is no longer created in QWaylandWlShellSurfaceItem::componentComplete Change-Id: I7a0dbbacddc17ab32ed0e4d16e717fcefb221947 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Erik Larsson <erik@ortogonal.com>
Diffstat (limited to 'src/compositor/extensions/qwaylandquickwlshellsurfaceitem.cpp')
-rw-r--r--src/compositor/extensions/qwaylandquickwlshellsurfaceitem.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/compositor/extensions/qwaylandquickwlshellsurfaceitem.cpp b/src/compositor/extensions/qwaylandquickwlshellsurfaceitem.cpp
index fc6d856d8..a385e5e4e 100644
--- a/src/compositor/extensions/qwaylandquickwlshellsurfaceitem.cpp
+++ b/src/compositor/extensions/qwaylandquickwlshellsurfaceitem.cpp
@@ -110,6 +110,7 @@ void QWaylandQuickWlShellSurfaceItem::setShellSurface(QWaylandWlShellSurface *sh
connect(d->shellSurface, &QWaylandWlShellSurface::startMove, this, &QWaylandQuickWlShellSurfaceItem::handleStartMove);
connect(d->shellSurface, &QWaylandWlShellSurface::startResize, this, &QWaylandQuickWlShellSurfaceItem::handleStartResize);
}
+ setSurface(shellSurface ? shellSurface->surface() : nullptr);
emit shellSurfaceChanged();
}
@@ -226,16 +227,4 @@ void QWaylandQuickWlShellSurfaceItem::surfaceChangedEvent(QWaylandSurface *newSu
connect(newSurface, &QWaylandSurface::offsetForNextFrame, this, &QWaylandQuickWlShellSurfaceItem::adjustOffsetForNextFrame);
}
-/*!
- * \internal
- */
-void QWaylandQuickWlShellSurfaceItem::componentComplete()
-{
- Q_D(QWaylandQuickWlShellSurfaceItem);
- if (!d->shellSurface)
- setShellSurface(new QWaylandWlShellSurface());
-
- QWaylandQuickItem::componentComplete();
-}
-
QT_END_NAMESPACE