summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-10-04 10:42:45 +0200
committerLiang Qi <liang.qi@qt.io>2017-10-04 10:42:45 +0200
commit04f6ff77ef0c8858629766e191ecc3d4ef056848 (patch)
treed3684e21bf277bdd2b0d284042d627d97ad528db /src/compositor/compositor_api
parenta81fc596a3cbcc07396be1c0284f1ee8aa44ff8c (diff)
parent00a99e631459eb7e52fde822c24d7b9d603008c4 (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta1
Diffstat (limited to 'src/compositor/compositor_api')
-rw-r--r--src/compositor/compositor_api/qwaylandseat.cpp11
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.cpp4
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.h3
-rw-r--r--src/compositor/compositor_api/qwaylandview.cpp9
4 files changed, 22 insertions, 5 deletions
diff --git a/src/compositor/compositor_api/qwaylandseat.cpp b/src/compositor/compositor_api/qwaylandseat.cpp
index 60a9c60d2..80b75d617 100644
--- a/src/compositor/compositor_api/qwaylandseat.cpp
+++ b/src/compositor/compositor_api/qwaylandseat.cpp
@@ -154,6 +154,17 @@ void QWaylandSeatPrivate::seat_get_touch(wl_seat::Resource *resource, uint32_t i
}
/*!
+ * \qmltype WaylandSeat
+ * \inqmlmodule QtWayland.Compositor
+ * \since 5.8
+ * \brief Provides access to keyboard, mouse, and touch input.
+ *
+ * The WaylandSeat type provides access to different types of user input and maintains
+ * a keyboard focus and a mouse pointer. It corresponds to the wl_seat interface in the Wayland
+ * protocol.
+ */
+
+/*!
* \class QWaylandSeat
* \inmodule QtWaylandCompositor
* \since 5.8
diff --git a/src/compositor/compositor_api/qwaylandsurface.cpp b/src/compositor/compositor_api/qwaylandsurface.cpp
index 6a6d65206..6f277dd96 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 a2186491b..010f279af 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();
diff --git a/src/compositor/compositor_api/qwaylandview.cpp b/src/compositor/compositor_api/qwaylandview.cpp
index 1ce923d48..f56cb0b8e 100644
--- a/src/compositor/compositor_api/qwaylandview.cpp
+++ b/src/compositor/compositor_api/qwaylandview.cpp
@@ -118,10 +118,11 @@ QObject *QWaylandView::renderObject() const
return d->renderObject;
}
/*!
-* \qmlproperty object QtWaylandCompositor::WaylandView::surface
-*
-* This property holds the surface viewed by this WaylandView.
-*/
+ * \qmlproperty object QtWaylandCompositor::WaylandView::surface
+ *
+ * This property holds the surface viewed by this WaylandView.
+ */
+
/*!
* \property QWaylandView::surface
*