diff options
Diffstat (limited to 'src/compositor/compositor_api/qwaylandview.cpp')
-rw-r--r-- | src/compositor/compositor_api/qwaylandview.cpp | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/src/compositor/compositor_api/qwaylandview.cpp b/src/compositor/compositor_api/qwaylandview.cpp index 12b67bf5d..1f32bb61d 100644 --- a/src/compositor/compositor_api/qwaylandview.cpp +++ b/src/compositor/compositor_api/qwaylandview.cpp @@ -37,7 +37,7 @@ #include "qwaylandview.h" #include "qwaylandview_p.h" #include "qwaylandsurface.h" -#include <QtWaylandCompositor/QWaylandInputDevice> +#include <QtWaylandCompositor/QWaylandSeat> #include <QtWaylandCompositor/QWaylandCompositor> #include <QtWaylandCompositor/private/qwaylandsurface_p.h> @@ -96,7 +96,7 @@ QWaylandView::~QWaylandView() if (d->surface) { if (d->output) QWaylandOutputPrivate::get(d->output)->removeView(this, d->surface); - QWaylandInputDevice *i = d->surface->compositor()->defaultInputDevice(); + QWaylandSeat *i = d->surface->compositor()->defaultSeat(); if (i->mouseFocus() == this) i->setMouseFocus(Q_NULLPTR); @@ -145,7 +145,7 @@ void QWaylandView::setSurface(QWaylandSurface *newSurface) d->surface = newSurface; - if (!d->bufferLock) { + if (!d->bufferLocked) { d->currentBuffer = QWaylandBufferRef(); d->currentDamage = QRegion(); } @@ -216,7 +216,7 @@ void QWaylandView::attach(const QWaylandBufferRef &ref, const QRegion &damage) * * If this view is set as the surface's throttling view, discardCurrentBuffer() * is called on all views of the same surface for which the - * \l{QWaylandView::discardFrontBuffers}{discardFrontBuffers} + * \l{QWaylandView::allowDiscardFrontBuffer}{allowDiscardFrontBuffer} * property is set to true and the current buffer is the same as the * throttling view's current buffer. * @@ -231,12 +231,12 @@ bool QWaylandView::advance() if (d->currentBuffer == d->nextBuffer && !d->forceAdvanceSucceed) return false; - if (d->bufferLock) + if (d->bufferLocked) return false; if (d->surface && d->surface->throttlingView() == this) { Q_FOREACH (QWaylandView *view, d->surface->views()) { - if (view != this && view->discardFrontBuffers() && view->d_func()->currentBuffer == d->currentBuffer) + if (view != this && view->allowDiscardFrontBuffer() && view->d_func()->currentBuffer == d->currentBuffer) view->discardCurrentBuffer(); } } @@ -280,7 +280,7 @@ QRegion QWaylandView::currentDamage() } /*! - * \qmlproperty bool QtWaylandCompositor::WaylandView::bufferLock + * \qmlproperty bool QtWaylandCompositor::WaylandView::bufferLocked * * This property holds whether the view's buffer is currently locked. When * the buffer is locked, advance() will not advance to the next buffer and @@ -290,7 +290,7 @@ QRegion QWaylandView::currentDamage() */ /*! - * \property QWaylandView::bufferLock + * \property QWaylandView::bufferLocked * * This property holds whether the view's buffer is currently locked. When * the buffer is locked, advance() will not advance to the next buffer @@ -301,42 +301,43 @@ QRegion QWaylandView::currentDamage() bool QWaylandView::isBufferLocked() const { Q_D(const QWaylandView); - return d->bufferLock; + return d->bufferLocked; } -void QWaylandView::setBufferLock(bool locked) +void QWaylandView::setBufferLocked(bool locked) { Q_D(QWaylandView); - if (d->bufferLock == locked) + if (d->bufferLocked == locked) return; - d->bufferLock = locked; - emit bufferLockChanged(); + d->bufferLocked = locked; + emit bufferLockedChanged(); } /*! - * \qmlproperty bool QtWaylandCompositor::WaylandView::discardFrontBuffers + * \qmlproperty bool QtWaylandCompositor::WaylandView::allowDiscardFrontBuffer * * By default, the view locks the current buffer until advance() is called. Set this property * to true to allow Qt to release the buffer when the throttling view is no longer using it. */ + /*! - * \property QWaylandView::discardFrontBuffers + * \property QWaylandView::allowDiscardFrontBuffer * * By default, the view locks the current buffer until advance() is called. Set this property * to \c true to allow Qt to release the buffer when the throttling view is no longer using it. */ -bool QWaylandView::discardFrontBuffers() const +bool QWaylandView::allowDiscardFrontBuffer() const { Q_D(const QWaylandView); - return d->discardFrontBuffers; + return d->allowDiscardFrontBuffer; } -void QWaylandView::setDiscardFrontBuffers(bool discard) +void QWaylandView::setAllowDiscardFrontBuffer(bool discard) { Q_D(QWaylandView); - if (d->discardFrontBuffers == discard) + if (d->allowDiscardFrontBuffer == discard) return; - d->discardFrontBuffers = discard; - emit discardFrontBuffersChanged(); + d->allowDiscardFrontBuffer = discard; + emit allowDiscardFrontBufferChanged(); } /*! |