diff options
Diffstat (limited to 'examples/wayland/pure-qml')
-rw-r--r-- | examples/wayland/pure-qml/qml/Screen.qml | 51 | ||||
-rw-r--r-- | examples/wayland/pure-qml/qml/main.qml | 9 |
2 files changed, 30 insertions, 30 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 + } } } } diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml index 66382c479..61b88574d 100644 --- a/examples/wayland/pure-qml/qml/main.qml +++ b/examples/wayland/pure-qml/qml/main.qml @@ -66,7 +66,7 @@ WaylandCompositor { } onCreateShellSurface: { - var item = chromeComponent.createObject(primarySurfacesArea, { "surface": surface } ); + var item = chromeComponent.createObject(primaryOutput.surfaceArea, { "surface": surface } ); var shellSurface = shellSurfaceComponent.createObject(); shellSurface.initialize(defaultShell, surface, item.view, client, id); } @@ -78,14 +78,11 @@ WaylandCompositor { ] function addScreen() { - var screen = screenComponent.createObject(0, { "compositor" : compositor } ); - primarySurfacesArea = screen.surfacesArea; - var output = compositor.primaryOutputSpace.addOutputWindow(screen); - output.automaticFrameCallback = true; + var screen = screenComponent.createObject(0, { "outputSpace" : primaryOutputSpace } ); } Component.onCompleted: { - addScreen(); + addScreen(WaylandOutput.PrimaryOutput); } } |