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 | cf514c46a949ce99450f6d1f4470800f1183a225 (patch) | |
| tree | a863b0a200ea2278a922ecf24cc73c9e1c2643d3 /src/plugins/platforms/wayland/qwaylandsubsurface.cpp | |
| parent | b8fc07100ba918bb2f0e5ff547ca3223a599e337 (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/plugins/platforms/wayland/qwaylandsubsurface.cpp')
| -rw-r--r-- | src/plugins/platforms/wayland/qwaylandsubsurface.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandsubsurface.cpp b/src/plugins/platforms/wayland/qwaylandsubsurface.cpp index ec813609fd2..72b80c18f0e 100644 --- a/src/plugins/platforms/wayland/qwaylandsubsurface.cpp +++ b/src/plugins/platforms/wayland/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 |
