diff options
4 files changed, 9 insertions, 9 deletions
diff --git a/examples/wayland/custom-extension/compositor/qml/Screen.qml b/examples/wayland/custom-extension/compositor/qml/Screen.qml index 1e6d3e402..9c46a2035 100644 --- a/examples/wayland/custom-extension/compositor/qml/Screen.qml +++ b/examples/wayland/custom-extension/compositor/qml/Screen.qml @@ -121,7 +121,7 @@ WaylandOutput { anchors.top: parent.top anchors.bottom: parent.bottom - windowSystemCursorEnabled: true + windowSystemCursorEnabled: !clientCursor.visible Image { id: background anchors.fill: parent @@ -130,8 +130,7 @@ WaylandOutput { smooth: false } WaylandCursorItem { - id: cursor - inputEventsEnabled: false + id: clientCursor x: mouseTracker.mouseX y: mouseTracker.mouseY diff --git a/examples/wayland/multi-output/qml/ShellScreen.qml b/examples/wayland/multi-output/qml/ShellScreen.qml index aa9b4b29b..20a0e80ac 100644 --- a/examples/wayland/multi-output/qml/ShellScreen.qml +++ b/examples/wayland/multi-output/qml/ShellScreen.qml @@ -66,7 +66,7 @@ WaylandOutput { id: mouseTracker anchors.fill: parent - windowSystemCursorEnabled: true + windowSystemCursorEnabled: !clientCursor.visible Image { id: background anchors.fill: parent @@ -75,11 +75,10 @@ WaylandOutput { smooth: true } WaylandCursorItem { - id: cursor - inputEventsEnabled: false + id: clientCursor x: mouseTracker.mouseX y: mouseTracker.mouseY - + visible: surface !== null && mouseTracker.containsMouse seat : output.compositor.defaultSeat } } diff --git a/examples/wayland/multi-screen/qml/Screen.qml b/examples/wayland/multi-screen/qml/Screen.qml index 21f2d1266..edf842c0c 100644 --- a/examples/wayland/multi-screen/qml/Screen.qml +++ b/examples/wayland/multi-screen/qml/Screen.qml @@ -74,7 +74,7 @@ WaylandOutput { WaylandMouseTracker { id: mouseTracker anchors.fill: parent - windowSystemCursorEnabled: false + windowSystemCursorEnabled: !clientCursor.visible Rectangle { anchors.fill: parent @@ -88,11 +88,12 @@ WaylandOutput { } WaylandCursorItem { + id: clientCursor inputEventsEnabled: false x: mouseTracker.mouseX y: mouseTracker.mouseY seat: comp.defaultSeat - visible: mouseTracker.containsMouse + visible: surface !== null && mouseTracker.containsMouse } } Shortcut { diff --git a/src/compositor/compositor_api/qwaylandpointer.cpp b/src/compositor/compositor_api/qwaylandpointer.cpp index 38cb5d7f2..9e8bfff15 100644 --- a/src/compositor/compositor_api/qwaylandpointer.cpp +++ b/src/compositor/compositor_api/qwaylandpointer.cpp @@ -93,6 +93,7 @@ void QWaylandPointerPrivate::sendLeave() enteredSurface = nullptr; localPosition = QPointF(); enteredSurfaceDestroyListener.reset(); + seat->cursorSurfaceRequest(nullptr, 0, 0); } void QWaylandPointerPrivate::ensureEntered(QWaylandSurface *surface) |