summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddisplay.cpp
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2015-07-05 17:58:23 +0300
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-07-22 07:42:07 +0000
commit2e3cddf8b28cf6ce2b4db9c9a21f0a2427bdf756 (patch)
treed61f67f2468431379df438052e701d803c7f1c40 /src/client/qwaylanddisplay.cpp
parent6c47babc1a3566c7186e3196e7975df2be9b575b (diff)
Use standard wl_subsurface interface to set a window as a child of another one
Change-Id: I52628f87dbea5383db06468f9748a9bacdec3179 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r--src/client/qwaylanddisplay.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 5b6f2cbf6..ab69bca32 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -100,6 +100,15 @@ struct ::wl_region *QWaylandDisplay::createRegion(const QRegion &qregion)
return region;
}
+::wl_subsurface *QWaylandDisplay::createSubSurface(QWaylandWindow *window, QWaylandWindow *parent)
+{
+ if (!mSubCompositor) {
+ return NULL;
+ }
+
+ return mSubCompositor->get_subsurface(window->object(), parent->object());
+}
+
QWaylandClientBufferIntegration * QWaylandDisplay::clientBufferIntegration() const
{
return mWaylandIntegration->clientBufferIntegration();
@@ -125,7 +134,7 @@ QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
, mLastKeyboardFocusInputDevice(0)
, mDndSelectionHandler(0)
, mWindowExtension(0)
- , mSubSurfaceExtension(0)
+ , mSubCompositor(0)
, mTouchExtension(0)
, mQtKeyExtension(0)
, mTextInputManager(0)
@@ -259,8 +268,8 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
mDndSelectionHandler.reset(new QWaylandDataDeviceManager(this, id));
} else if (interface == QStringLiteral("qt_surface_extension")) {
mWindowExtension.reset(new QtWayland::qt_surface_extension(registry, id, 1));
- } else if (interface == QStringLiteral("qt_sub_surface_extension")) {
- mSubSurfaceExtension.reset(new QtWayland::qt_sub_surface_extension(registry, id, 1));
+ } else if (interface == QStringLiteral("wl_subcompositor")) {
+ mSubCompositor.reset(new QtWayland::wl_subcompositor(registry, id, 1));
} else if (interface == QStringLiteral("qt_touch_extension")) {
mTouchExtension.reset(new QWaylandTouchExtension(this, id));
} else if (interface == QStringLiteral("qt_key_extension")) {