summaryrefslogtreecommitdiffstats
path: root/src/compositor/wayland_wrapper
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@theqtcompany.com>2015-07-29 14:38:18 +0200
committerJørgen Lind <jorgen.lind@theqtcompany.com>2015-08-28 13:09:41 +0200
commit0a7ae4374e9b3c0128388e5b68075f6f06347c71 (patch)
tree639304bdf32aaf4a42521c989c338ed407d97a53 /src/compositor/wayland_wrapper
parent42d052afccd9a968bc9897a84866f25b80ec2646 (diff)
Make it possible to set a QWaylandSurface on the QWaylandSurfaceView
This will allow us to use QWaylandSurfaceItem from within QML Change-Id: I6ecfbf3a5de5f5a748a6a85295b9741316fef976
Diffstat (limited to 'src/compositor/wayland_wrapper')
-rw-r--r--src/compositor/wayland_wrapper/qwldatadevice.cpp2
-rw-r--r--src/compositor/wayland_wrapper/qwlshellsurface.cpp2
-rw-r--r--src/compositor/wayland_wrapper/qwlsurface.cpp1
-rw-r--r--src/compositor/wayland_wrapper/qwlsurface_p.h2
4 files changed, 5 insertions, 2 deletions
diff --git a/src/compositor/wayland_wrapper/qwldatadevice.cpp b/src/compositor/wayland_wrapper/qwldatadevice.cpp
index 2e694ca27..73a93a8c8 100644
--- a/src/compositor/wayland_wrapper/qwldatadevice.cpp
+++ b/src/compositor/wayland_wrapper/qwldatadevice.cpp
@@ -182,7 +182,7 @@ void DataDevice::data_device_start_drag(Resource *resource, struct ::wl_resource
m_dragClient = resource->client();
m_dragDataSource = source != 0 ? DataSource::fromResource(source) : 0;
- m_dragIcon = icon != 0 ? m_compositor->waylandCompositor()->createView(Surface::fromResource(icon)->waylandSurface()) : 0;
+ m_dragIcon = icon != 0 ? m_compositor->waylandCompositor()->createSurfaceView(Surface::fromResource(icon)->waylandSurface()) : 0;
Q_EMIT m_inputDevice->dragHandle()->iconChanged();
m_inputDevice->pointerDevice()->setFocus(0, QPointF());
diff --git a/src/compositor/wayland_wrapper/qwlshellsurface.cpp b/src/compositor/wayland_wrapper/qwlshellsurface.cpp
index efa211013..bc75ab4c3 100644
--- a/src/compositor/wayland_wrapper/qwlshellsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlshellsurface.cpp
@@ -95,7 +95,7 @@ ShellSurface::ShellSurface(Shell *shell, wl_client *client, uint32_t id, Surface
, m_popupGrabber(0)
, m_popupSerial()
{
- m_view = surface->compositor()->waylandCompositor()->createView(surface->waylandSurface());
+ m_view = surface->compositor()->waylandCompositor()->createSurfaceView(surface->waylandSurface());
connect(surface->waylandSurface(), &QWaylandSurface::configure, this, &ShellSurface::configure);
connect(surface->waylandSurface(), &QWaylandSurface::mapped, this, &ShellSurface::mapped);
connect(surface->waylandSurface(), &QWaylandSurface::offsetForNextFrame, this, &ShellSurface::adjustOffset);
diff --git a/src/compositor/wayland_wrapper/qwlsurface.cpp b/src/compositor/wayland_wrapper/qwlsurface.cpp
index 03edbc1dc..d8f80b0f4 100644
--- a/src/compositor/wayland_wrapper/qwlsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlsurface.cpp
@@ -453,6 +453,7 @@ Qt::ScreenOrientation Surface::contentOrientation() const
return m_contentOrientation;
}
+
void Surface::surface_destroy_resource(Resource *)
{
if (m_extendedSurface) {
diff --git a/src/compositor/wayland_wrapper/qwlsurface_p.h b/src/compositor/wayland_wrapper/qwlsurface_p.h
index af1770a4e..32c6ecf66 100644
--- a/src/compositor/wayland_wrapper/qwlsurface_p.h
+++ b/src/compositor/wayland_wrapper/qwlsurface_p.h
@@ -234,6 +234,8 @@ protected:
void setBackBuffer(SurfaceBuffer *buffer);
SurfaceBuffer *createSurfaceBuffer(struct ::wl_resource *buffer);
+ QList<QWaylandSurfaceView *> views;
+
friend class QWaylandSurface;
friend class RoleBase;
};