summaryrefslogtreecommitdiffstats
path: root/examples/wayland/pure-qml/qml/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/wayland/pure-qml/qml/main.qml')
-rw-r--r--examples/wayland/pure-qml/qml/main.qml13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml
index 0fe92668a..12f6063b4 100644
--- a/examples/wayland/pure-qml/qml/main.qml
+++ b/examples/wayland/pure-qml/qml/main.qml
@@ -56,6 +56,13 @@ WaylandCompositor {
Chrome { }
}
+ Component {
+ id: surfaceComponent
+ WaylandSurface {
+ property QtObject shellSurface: null
+ }
+ }
+
extensions: [
DefaultShell {
id: defaultShell
@@ -69,6 +76,7 @@ WaylandCompositor {
var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "surface": surface } );
var shellSurface = shellSurfaceComponent.createObject();
shellSurface.initialize(defaultShell, surface, item.view, client, id);
+ surface.shellSurface = shellSurface;
}
Component.onCompleted: {
@@ -77,6 +85,11 @@ WaylandCompositor {
}
]
+ onCreateSurface: {
+ var surface = surfaceComponent.createObject(0, { } );
+ surface.initialize(compositor, client, id, version);
+ }
+
Component.onCompleted: {
screenComponent.createObject(0, { "outputSpace" : defaultOutputSpace } );
}