summaryrefslogtreecommitdiffstats
path: root/examples/wayland/pure-qml/qml/Screen.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/wayland/pure-qml/qml/Screen.qml')
-rw-r--r--examples/wayland/pure-qml/qml/Screen.qml51
1 files changed, 27 insertions, 24 deletions
diff --git a/examples/wayland/pure-qml/qml/Screen.qml b/examples/wayland/pure-qml/qml/Screen.qml
index 1faaa2cce..61e044cbf 100644
--- a/examples/wayland/pure-qml/qml/Screen.qml
+++ b/examples/wayland/pure-qml/qml/Screen.qml
@@ -42,35 +42,38 @@ import QtQuick 2.0
import QtQuick.Window 2.2
import QtWayland.Compositor 1.0
-Window {
- id: screen
- property alias surfacesArea: background
+WaylandOutput {
+ id: output
+ property alias surfaceArea: background
+ window: Window {
+ id: screen
- property QtObject compositor
+ property QtObject output
- width: 1024
- height: 760
- visible: true
+ width: 1024
+ height: 760
+ visible: true
- WaylandMouseTracker {
- id: mouseTracker
- anchors.fill: parent
-
- enableWSCursor: true
- Image {
- id: background
+ WaylandMouseTracker {
+ id: mouseTracker
anchors.fill: parent
- fillMode: Image.Tile
- source: "qrc:/images/background.jpg"
- smooth: true
- }
- WaylandCursorItem {
- id: cursor
- inputEventsEnabled: false
- x: mouseTracker.mouseX - hotspotX
- y: mouseTracker.mouseY - hotspotY
- inputDevice: output.compositor.defaultInputDevice
+ enableWSCursor: true
+ Image {
+ id: background
+ anchors.fill: parent
+ fillMode: Image.Tile
+ source: "qrc:/images/background.jpg"
+ smooth: true
+ }
+ WaylandCursorItem {
+ id: cursor
+ inputEventsEnabled: false
+ x: mouseTracker.mouseX - hotspotX
+ y: mouseTracker.mouseY - hotspotY
+
+ inputDevice: output.compositor.defaultInputDevice
+ }
}
}
}