diff options
author | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2014-04-14 12:39:05 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-29 12:07:02 +0200 |
commit | 5a6fc53acc3721b637453ab5a7b36cb36db97821 (patch) | |
tree | c7d645f9f2e8bf3c83ef4883e37c06ac611cb08e /src/compositor/compositor_api/qwaylandcompositor.h | |
parent | 89bb266aa84bc8fa742999c99e47c3fed742c6a9 (diff) |
Make it possible to have custom shell implementations
Different compositors may need different shell behaviors, or
even different shell protocols. A smartphone compositor, for
example, may want to make wl_shell_surface::set_popup or
other requests noop, because they don't make sense in the
formfactor, or it may even want to not implement wl_shell_surface
at all, but some smartphone_shell_surface.
A compositor may define its own shell implementation by overriding
QWaylandCompositor::initShell(), and creating there its interface
instance. The default implementation still creates the built-in
wl_shell_surface implementation.
Change-Id: I143b0cd4e30e31d4051ada6e562d486d9bf1a751
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/compositor/compositor_api/qwaylandcompositor.h')
-rw-r--r-- | src/compositor/compositor_api/qwaylandcompositor.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandcompositor.h b/src/compositor/compositor_api/qwaylandcompositor.h index 732d6821d..119e63f2d 100644 --- a/src/compositor/compositor_api/qwaylandcompositor.h +++ b/src/compositor/compositor_api/qwaylandcompositor.h @@ -56,6 +56,7 @@ class QWaylandSurface; class QWaylandInputDevice; class QWaylandInputPanel; class QWaylandDrag; +class QWaylandGlobalInterface; class QWaylandSurfaceView; namespace QtWayland @@ -83,6 +84,7 @@ public: QWaylandCompositor(QWindow *window = 0, const char *socketName = 0, ExtensionFlags extensions = DefaultExtensions); virtual ~QWaylandCompositor(); + void addGlobalInterface(QWaylandGlobalInterface *interface); struct wl_display *waylandDisplay() const; void frameStarted(); @@ -146,6 +148,7 @@ public: protected: QWaylandCompositor(QWindow *window, const char *socketName, QtWayland::Compositor *dptr); virtual void retainedSelectionReceived(QMimeData *mimeData); + virtual void initShell(); friend class QtWayland::Compositor; QtWayland::Compositor *m_compositor; |