summaryrefslogtreecommitdiffstats
path: root/src/compositor/wayland_wrapper
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@theqtcompany.com>2015-07-29 13:52:59 +0200
committerJørgen Lind <jorgen.lind@theqtcompany.com>2015-08-28 13:09:41 +0200
commit5d36c263ec9d3e5f95cf098d3f72b135089deeb3 (patch)
treebad44c5d020609b092b6e922fec54d8e2ca8f4af /src/compositor/wayland_wrapper
parent030a09ad7ad0eaa81823f7eb90e8512da2ba097b (diff)
Add a shellView property on QWaylandSurface
Diffstat (limited to 'src/compositor/wayland_wrapper')
-rw-r--r--src/compositor/wayland_wrapper/qwlshellsurface.cpp1
-rw-r--r--src/compositor/wayland_wrapper/qwlshellsurface_p.h1
-rw-r--r--src/compositor/wayland_wrapper/qwlsurface.cpp13
-rw-r--r--src/compositor/wayland_wrapper/qwlsurface_p.h5
4 files changed, 20 insertions, 0 deletions
diff --git a/src/compositor/wayland_wrapper/qwlshellsurface.cpp b/src/compositor/wayland_wrapper/qwlshellsurface.cpp
index 51b585831..c20917f66 100644
--- a/src/compositor/wayland_wrapper/qwlshellsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlshellsurface.cpp
@@ -98,6 +98,7 @@ ShellSurface::ShellSurface(Shell *shell, wl_client *client, uint32_t id, Surface
m_view = surface->compositor()->waylandCompositor()->createView(surface->waylandSurface());
connect(surface->waylandSurface(), &QWaylandSurface::configure, this, &ShellSurface::configure);
connect(surface->waylandSurface(), &QWaylandSurface::mapped, this, &ShellSurface::mapped);
+ surface->setShellSurface(this);
}
ShellSurface::~ShellSurface()
diff --git a/src/compositor/wayland_wrapper/qwlshellsurface_p.h b/src/compositor/wayland_wrapper/qwlshellsurface_p.h
index dbcc56f51..2d6d1687f 100644
--- a/src/compositor/wayland_wrapper/qwlshellsurface_p.h
+++ b/src/compositor/wayland_wrapper/qwlshellsurface_p.h
@@ -98,6 +98,7 @@ public:
void requestSize(const QSize &size);
void ping(uint32_t serial);
+ QWaylandSurfaceView *view() { return m_view; }
protected:
bool runOperation(QWaylandSurfaceOp *op) Q_DECL_OVERRIDE;
diff --git a/src/compositor/wayland_wrapper/qwlsurface.cpp b/src/compositor/wayland_wrapper/qwlsurface.cpp
index 297a69132..3d87764d9 100644
--- a/src/compositor/wayland_wrapper/qwlsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlsurface.cpp
@@ -43,6 +43,7 @@
#include "qwlregion_p.h"
#include "qwlsubsurface_p.h"
#include "qwlsurfacebuffer_p.h"
+#include "qwlshellsurface_p.h"
#include "qwaylandsurfaceview.h"
#include "qwaylandoutput.h"
@@ -251,6 +252,18 @@ QPoint Surface::lastMousePos() const
return m_lastLocalMousePos;
}
+void Surface::setShellSurface(ShellSurface *shellSurface)
+{
+ m_shellSurface = shellSurface;
+ if (m_shellSurface)
+ emit m_waylandSurface->shellViewCreated();
+}
+
+ShellSurface *Surface::shellSurface() const
+{
+ return m_shellSurface;
+}
+
void Surface::setExtendedSurface(ExtendedSurface *extendedSurface)
{
m_extendedSurface = extendedSurface;
diff --git a/src/compositor/wayland_wrapper/qwlsurface_p.h b/src/compositor/wayland_wrapper/qwlsurface_p.h
index 210d07e02..af1770a4e 100644
--- a/src/compositor/wayland_wrapper/qwlsurface_p.h
+++ b/src/compositor/wayland_wrapper/qwlsurface_p.h
@@ -67,6 +67,7 @@ namespace QtWayland {
class Compositor;
class Buffer;
+class ShellSurface;
class ExtendedSurface;
class InputPanelSurface;
class SubSurface;
@@ -108,6 +109,9 @@ public:
QPoint lastMousePos() const;
+ void setShellSurface(ShellSurface *shellSurface);
+ ShellSurface *shellSurface() const;
+
void setExtendedSurface(ExtendedSurface *extendedSurface);
ExtendedSurface *extendedSurface() const;
@@ -203,6 +207,7 @@ protected:
QList<FrameCallback *> m_pendingFrameCallbacks;
QList<FrameCallback *> m_frameCallbacks;
+ ShellSurface *m_shellSurface;
ExtendedSurface *m_extendedSurface;
SubSurface *m_subSurface;
InputPanelSurface *m_inputPanelSurface;