From d9e0249e064bdeef545a95c64d54ac56b73833f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Thu, 17 Sep 2015 12:32:48 +0200 Subject: Simplify the construction of pure-qml Make it possible that an WaylandOutput item is declared as a child of a WaylandCompositor item. This is mostly usefull for examples, since output handling will likely be event driven in a propper compositor Change-Id: I3238b079e41a49f69cbd9255818588674b364fb2 Reviewed-by: Paul Olav Tvete --- examples/wayland/pure-qml/qml/main.qml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'examples/wayland/pure-qml/qml') diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml index d20ea10fd..9ea92313f 100644 --- a/examples/wayland/pure-qml/qml/main.qml +++ b/examples/wayland/pure-qml/qml/main.qml @@ -42,13 +42,12 @@ import QtQuick 2.0 import QtWayland.Compositor 1.0 WaylandCompositor { - id: compositor + id: comp property var primarySurfacesArea: null - Component { - id: screenComponent - Screen { } + Screen { + compositor: comp } Component { @@ -80,12 +79,8 @@ WaylandCompositor { ] onCreateSurface: { - var surface = surfaceComponent.createObject(compositor, { } ); - surface.initialize(compositor, client, id, version); - - } + var surface = surfaceComponent.createObject(comp, { } ); + surface.initialize(comp, client, id, version); - Component.onCompleted: { - screenComponent.createObject(compositor, { "outputSpace" : defaultOutputSpace } ); } } -- cgit v1.2.3