summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-10-05 20:40:56 +0200
committerLiang Qi <liang.qi@qt.io>2017-10-05 20:40:56 +0200
commit6c859cf7b5f1814cfcd3dabb1b82f33c2cf8a649 (patch)
tree81985e691abb11f120a249c5cfca7354a2aaa184 /src/compositor/compositor_api
parentee1181115961163a0ba6ac7a7661521c955ec16d (diff)
parent04f6ff77ef0c8858629766e191ecc3d4ef056848 (diff)
Merge remote-tracking branch 'origin/5.10' into dev
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 e508e0877..9bc7671be 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 bfe7b0c32..4e75b5284 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 3114fce0b..4de2405ca 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
*