diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2017-09-27 16:09:03 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2017-10-02 08:12:31 +0000 |
commit | 9a6bf3112168636295cd98fca9137ce03b387eaf (patch) | |
tree | 306d5c3961e460ff8aabf864ee685a6d52711e73 | |
parent | 1d6a50071953288e0d008af7773d9207c9f9404a (diff) | |
download | qtwayland-9a6bf3112168636295cd98fca9137ce03b387eaf.tar.gz |
Compositor: Add missing cursorSurfaceChanged signal
Change-Id: I23a67b8189ab84e6a70c9e3de5da15cf2e9a9d77
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-rw-r--r-- | src/compositor/compositor_api/qwaylandsurface.cpp | 4 | ||||
-rw-r--r-- | src/compositor/compositor_api/qwaylandsurface.h | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/compositor/compositor_api/qwaylandsurface.cpp b/src/compositor/compositor_api/qwaylandsurface.cpp index 6a6d6520..6f277dd9 100644 --- a/src/compositor/compositor_api/qwaylandsurface.cpp +++ b/src/compositor/compositor_api/qwaylandsurface.cpp @@ -666,7 +666,11 @@ bool QWaylandSurface::isDestroyed() const void QWaylandSurface::markAsCursorSurface(bool cursorSurface) { Q_D(QWaylandSurface); + if (d->isCursorSurface == cursorSurface) + return; + d->isCursorSurface = cursorSurface; + emit cursorSurfaceChanged(); } bool QWaylandSurface::isCursorSurface() const diff --git a/src/compositor/compositor_api/qwaylandsurface.h b/src/compositor/compositor_api/qwaylandsurface.h index a2186491..010f279a 100644 --- a/src/compositor/compositor_api/qwaylandsurface.h +++ b/src/compositor/compositor_api/qwaylandsurface.h @@ -86,7 +86,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandSurface : public QWaylandObject Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation NOTIFY contentOrientationChanged) Q_PROPERTY(QWaylandSurface::Origin origin READ origin NOTIFY originChanged) Q_PROPERTY(bool hasContent READ hasContent NOTIFY hasContentChanged) - Q_PROPERTY(bool cursorSurface READ isCursorSurface WRITE markAsCursorSurface) + Q_PROPERTY(bool cursorSurface READ isCursorSurface WRITE markAsCursorSurface NOTIFY cursorSurfaceChanged) public: enum Origin { @@ -165,6 +165,7 @@ Q_SIGNALS: void subsurfacePlaceAbove(QWaylandSurface *sibling); void subsurfacePlaceBelow(QWaylandSurface *sibling); void dragStarted(QWaylandDrag *drag); + void cursorSurfaceChanged(); void configure(bool hasBuffer); void redraw(); |