diff options
author | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2014-03-25 14:49:25 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-29 10:46:48 +0200 |
commit | 96ab8abe0b0faea7f63f0477025fe0649e410362 (patch) | |
tree | 9c868346e0e27155b72ed9cc4bd7992c1d9fdddf /src/compositor/compositor_api | |
parent | fc439e40e37f9c0b3108225f951fb19bb3abee80 (diff) |
Let the ShellSurface send the mapped and unmapped signals.
A surface without any attached shell surface should never be mapped,
so make the latter set the mapped state on the surface.
Change-Id: If09bd9eebecd6e0a52f862cb866d85aec403c3a0
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/compositor/compositor_api')
5 files changed, 6 insertions, 14 deletions
diff --git a/src/compositor/compositor_api/qwaylandquicksurface.cpp b/src/compositor/compositor_api/qwaylandquicksurface.cpp index e4a5f7732..1ce229d21 100644 --- a/src/compositor/compositor_api/qwaylandquicksurface.cpp +++ b/src/compositor/compositor_api/qwaylandquicksurface.cpp @@ -196,7 +196,7 @@ void QWaylandQuickSurface::setUseTextureAlpha(bool useTextureAlpha) if (d->useTextureAlpha != useTextureAlpha) { d->useTextureAlpha = useTextureAlpha; emit useTextureAlphaChanged(); - emit configure(); + emit configure(d->buffer->bufferRef); } } diff --git a/src/compositor/compositor_api/qwaylandsurface.cpp b/src/compositor/compositor_api/qwaylandsurface.cpp index 5fd7fabe9..80b37e419 100644 --- a/src/compositor/compositor_api/qwaylandsurface.cpp +++ b/src/compositor/compositor_api/qwaylandsurface.cpp @@ -288,15 +288,6 @@ QString QWaylandSurface::title() const return d->title(); } -bool QWaylandSurface::hasShellSurface() const -{ - Q_D(const QWaylandSurface); - if (d->shellSurface()) - return true; - - return false; -} - bool QWaylandSurface::hasInputPanelSurface() const { Q_D(const QWaylandSurface); diff --git a/src/compositor/compositor_api/qwaylandsurface.h b/src/compositor/compositor_api/qwaylandsurface.h index 22deee5ae..d5a30551c 100644 --- a/src/compositor/compositor_api/qwaylandsurface.h +++ b/src/compositor/compositor_api/qwaylandsurface.h @@ -161,7 +161,6 @@ public: QString title() const; - bool hasShellSurface() const; bool hasInputPanelSurface() const; bool transientInactive() const; @@ -203,7 +202,7 @@ signals: void pong(); void surfaceDestroyed(); - void configure(); + void configure(bool hasBuffer); void redraw(); }; diff --git a/src/compositor/compositor_api/qwaylandsurfaceitem.cpp b/src/compositor/compositor_api/qwaylandsurfaceitem.cpp index 1a1dc7cdb..f000e7f8b 100644 --- a/src/compositor/compositor_api/qwaylandsurfaceitem.cpp +++ b/src/compositor/compositor_api/qwaylandsurfaceitem.cpp @@ -309,8 +309,10 @@ void QWaylandSurfaceItem::setPaintEnabled(bool enabled) update(); } -void QWaylandSurfaceItem::updateBuffer() +void QWaylandSurfaceItem::updateBuffer(bool hasBuffer) { + Q_UNUSED(hasBuffer) + bool inv = m_yInverted; m_yInverted = surface()->isYInverted(); if (inv != m_yInverted) diff --git a/src/compositor/compositor_api/qwaylandsurfaceitem.h b/src/compositor/compositor_api/qwaylandsurfaceitem.h index f1da27995..1e6363305 100644 --- a/src/compositor/compositor_api/qwaylandsurfaceitem.h +++ b/src/compositor/compositor_api/qwaylandsurfaceitem.h @@ -108,7 +108,7 @@ private slots: void updateSize(); void updateSurfaceSize(); void updatePosition(); - void updateBuffer(); + void updateBuffer(bool hasBuffer); signals: void touchEventsEnabledChanged(); |