diff options
-rw-r--r-- | examples/wayland/custom-extension/compositor/qml/Screen.qml | 2 | ||||
-rw-r--r-- | examples/wayland/minimal-qml/main.qml | 2 | ||||
-rw-r--r-- | examples/wayland/multi-output/qml/ShellScreen.qml | 2 | ||||
-rw-r--r-- | examples/wayland/pure-qml/qml/Screen.qml | 2 | ||||
-rw-r--r-- | src/imports/compositor/plugins.qmltypes | 2 | ||||
-rw-r--r-- | src/imports/compositor/qwaylandmousetracker.cpp | 16 | ||||
-rw-r--r-- | src/imports/compositor/qwaylandmousetracker_p.h | 8 |
7 files changed, 17 insertions, 17 deletions
diff --git a/examples/wayland/custom-extension/compositor/qml/Screen.qml b/examples/wayland/custom-extension/compositor/qml/Screen.qml index 3173c7a08..a4e69300f 100644 --- a/examples/wayland/custom-extension/compositor/qml/Screen.qml +++ b/examples/wayland/custom-extension/compositor/qml/Screen.qml @@ -58,7 +58,7 @@ WaylandOutput { id: mouseTracker anchors.fill: parent - enableWSCursor: true + windowSystemCursorEnabled: true Image { id: background anchors.fill: parent diff --git a/examples/wayland/minimal-qml/main.qml b/examples/wayland/minimal-qml/main.qml index 90d2fd4a1..217764a59 100644 --- a/examples/wayland/minimal-qml/main.qml +++ b/examples/wayland/minimal-qml/main.qml @@ -53,7 +53,7 @@ WaylandCompositor { visible: true WaylandMouseTracker { anchors.fill: parent - enableWSCursor: true + windowSystemCursorEnabled: true Rectangle { id: surfaceArea color: "#1337af" diff --git a/examples/wayland/multi-output/qml/ShellScreen.qml b/examples/wayland/multi-output/qml/ShellScreen.qml index 77fbeb828..0e53ba074 100644 --- a/examples/wayland/multi-output/qml/ShellScreen.qml +++ b/examples/wayland/multi-output/qml/ShellScreen.qml @@ -55,7 +55,7 @@ WaylandOutput { id: mouseTracker anchors.fill: parent - enableWSCursor: true + windowSystemCursorEnabled: true Image { id: background anchors.fill: parent diff --git a/examples/wayland/pure-qml/qml/Screen.qml b/examples/wayland/pure-qml/qml/Screen.qml index 2043fa8b4..59eeee75b 100644 --- a/examples/wayland/pure-qml/qml/Screen.qml +++ b/examples/wayland/pure-qml/qml/Screen.qml @@ -58,7 +58,7 @@ WaylandOutput { id: mouseTracker anchors.fill: parent - enableWSCursor: true + windowSystemCursorEnabled: true Image { id: background anchors.fill: parent diff --git a/src/imports/compositor/plugins.qmltypes b/src/imports/compositor/plugins.qmltypes index fdcc63d0f..a34630923 100644 --- a/src/imports/compositor/plugins.qmltypes +++ b/src/imports/compositor/plugins.qmltypes @@ -127,7 +127,7 @@ Module { Property { name: "mouseX"; type: "double"; isReadonly: true } Property { name: "mouseY"; type: "double"; isReadonly: true } Property { name: "containsMouse"; type: "bool"; isReadonly: true } - Property { name: "enableWSCursor"; type: "bool" } + Property { name: "windowSystemCursorEnabled"; type: "bool" } Signal { name: "hoveredChanged" } } Component { diff --git a/src/imports/compositor/qwaylandmousetracker.cpp b/src/imports/compositor/qwaylandmousetracker.cpp index a77d6b1a0..489dc7b55 100644 --- a/src/imports/compositor/qwaylandmousetracker.cpp +++ b/src/imports/compositor/qwaylandmousetracker.cpp @@ -45,7 +45,7 @@ class QWaylandMouseTrackerPrivate : public QQuickItemPrivate Q_DECLARE_PUBLIC(QWaylandMouseTracker) public: QWaylandMouseTrackerPrivate() - : enableWSCursor(false) + : windowSystemCursorEnabled(false) , hovered(false) { QImage cursorImage(64,64,QImage::Format_ARGB32); @@ -76,7 +76,7 @@ public: } QPointF mousePos; - bool enableWSCursor; + bool windowSystemCursorEnabled; QPixmap cursorPixmap; bool hovered; }; @@ -102,24 +102,24 @@ qreal QWaylandMouseTracker::mouseY() const return d->mousePos.y(); } -void QWaylandMouseTracker::setEnableWSCursor(bool enable) +void QWaylandMouseTracker::setWindowSystemCursorEnabled(bool enable) { Q_D(QWaylandMouseTracker); - if (d->enableWSCursor != enable) { - d->enableWSCursor = enable; + if (d->windowSystemCursorEnabled != enable) { + d->windowSystemCursorEnabled = enable; if (enable) { unsetCursor(); } else { setCursor(QCursor(d->cursorPixmap)); } - emit enableWSCursorChanged(); + emit windowSystemCursorEnabledChanged(); } } -bool QWaylandMouseTracker::enableWSCursor() const +bool QWaylandMouseTracker::windowSystemCursorEnabled() const { Q_D(const QWaylandMouseTracker); - return d->enableWSCursor; + return d->windowSystemCursorEnabled; } bool QWaylandMouseTracker::hovered() const diff --git a/src/imports/compositor/qwaylandmousetracker_p.h b/src/imports/compositor/qwaylandmousetracker_p.h index 1bc37a5e2..d90b037ff 100644 --- a/src/imports/compositor/qwaylandmousetracker_p.h +++ b/src/imports/compositor/qwaylandmousetracker_p.h @@ -53,21 +53,21 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandMouseTracker : public QQuickItem Q_PROPERTY(qreal mouseY READ mouseY NOTIFY mouseYChanged) Q_PROPERTY(bool containsMouse READ hovered NOTIFY hoveredChanged) - Q_PROPERTY(bool enableWSCursor READ enableWSCursor WRITE setEnableWSCursor NOTIFY enableWSCursorChanged) + Q_PROPERTY(bool windowSystemCursorEnabled READ windowSystemCursorEnabled WRITE setWindowSystemCursorEnabled NOTIFY windowSystemCursorEnabledChanged) public: QWaylandMouseTracker(QQuickItem *parent = 0); qreal mouseX() const; qreal mouseY() const; - void setEnableWSCursor(bool enable); - bool enableWSCursor() const; + void setWindowSystemCursorEnabled(bool enable); + bool windowSystemCursorEnabled() const; bool hovered() const; signals: void mouseXChanged(); void mouseYChanged(); - void enableWSCursorChanged(); + void windowSystemCursorEnabledChanged(); void hoveredChanged(); protected: |