diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-09-17 12:32:48 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-09-18 14:48:57 +0000 |
commit | d9e0249e064bdeef545a95c64d54ac56b73833f3 (patch) | |
tree | d3b88ebc90ead049e919d04f87a5dfa0f99e7a42 /examples | |
parent | 07dffc46ff14a745df020a987c2a17fbfd90d6fe (diff) |
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 <paul.tvete@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/wayland/pure-qml/qml/main.qml | 15 |
1 files changed, 5 insertions, 10 deletions
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 } ); } } |