diff options
author | Mikko Levonmaa <mikko.levonmaa@lge.com> | 2015-10-30 12:20:24 +0200 |
---|---|---|
committer | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2015-11-06 15:08:47 +0000 |
commit | 2eff05fe14c910c8b2cade8674e49404c6843e74 (patch) | |
tree | d076bb844ea82b7c224a5d9c39d5dd8834095149 /src/client/qwaylandsubsurface.cpp | |
parent | 6e46086974b05d3ed71470cf31916c4b7ffd11bc (diff) |
Add QWaylandWindowFunctions
Allow the control of the subsurface sync mode
Change-Id: I19f35261313282873f57228487a63a8f6a780b0c
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Diffstat (limited to 'src/client/qwaylandsubsurface.cpp')
-rw-r--r-- | src/client/qwaylandsubsurface.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/client/qwaylandsubsurface.cpp b/src/client/qwaylandsubsurface.cpp index ec813609f..72b80c18f 100644 --- a/src/client/qwaylandsubsurface.cpp +++ b/src/client/qwaylandsubsurface.cpp @@ -45,9 +45,10 @@ QWaylandSubSurface::QWaylandSubSurface(QWaylandWindow *window, QWaylandWindow *p : QtWayland::wl_subsurface(sub_surface) , m_window(window) , m_parent(parent) + , m_synchronized(false) { m_parent->mChildren << this; - set_desync(); + setDeSync(); } QWaylandSubSurface::~QWaylandSubSurface() @@ -55,6 +56,28 @@ QWaylandSubSurface::~QWaylandSubSurface() m_parent->mChildren.removeOne(this); } +void QWaylandSubSurface::setSync() +{ + QWaylandSubSurface::set_sync(); +} + +void QWaylandSubSurface::setDeSync() +{ + QWaylandSubSurface::set_desync(); +} + +void QWaylandSubSurface::set_sync() +{ + m_synchronized = true; + QtWayland::wl_subsurface::set_sync(); +} + +void QWaylandSubSurface::set_desync() +{ + m_synchronized = false; + QtWayland::wl_subsurface::set_desync(); +} + } QT_END_NAMESPACE |