diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/wayland/custom-extension/compositor/qml/main.qml | 28 | ||||
-rw-r--r-- | examples/wayland/multi-output/qml/main.qml | 14 | ||||
-rw-r--r-- | examples/wayland/pure-qml/qml/main.qml | 48 |
3 files changed, 42 insertions, 48 deletions
diff --git a/examples/wayland/custom-extension/compositor/qml/main.qml b/examples/wayland/custom-extension/compositor/qml/main.qml index 097bfe30b..fe33fb0c8 100644 --- a/examples/wayland/custom-extension/compositor/qml/main.qml +++ b/examples/wayland/custom-extension/compositor/qml/main.qml @@ -74,22 +74,18 @@ WaylandCompositor { } } - extensions: [ - WlShell { - id: defaultShell - - onShellSurfaceCreated: { - var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); - lastItem = item; - } - }, - CustomExtension { - id: custom - onRequestReceived: { - console.log("Compositor received a request: \"" + text + "\", " + value) - } + WlShell { + id: defaultShell + onShellSurfaceCreated: { + var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); + lastItem = item; } + } - ] - + CustomExtension { + id: custom + onRequestReceived: { + console.log("Compositor received a request: \"" + text + "\", " + value) + } + } } diff --git a/examples/wayland/multi-output/qml/main.qml b/examples/wayland/multi-output/qml/main.qml index 6a1483bca..18fbd4604 100644 --- a/examples/wayland/multi-output/qml/main.qml +++ b/examples/wayland/multi-output/qml/main.qml @@ -81,16 +81,14 @@ WaylandCompositor { } } - extensions: [ - WlShell { - id: defaultShell + WlShell { + id: defaultShell - onShellSurfaceCreated: { - var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); - item.surface.activated.connect(item.raise); - } + onShellSurfaceCreated: { + var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); + item.surface.activated.connect(item.raise); } - ] + } onCreateSurface: { var surface = surfaceComponent.createObject(comp, { } ); diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml index 0d99275eb..4f331641b 100644 --- a/examples/wayland/pure-qml/qml/main.qml +++ b/examples/wayland/pure-qml/qml/main.qml @@ -62,34 +62,34 @@ WaylandCompositor { } } - extensions: [ - QtWindowManager { - id: qtWindowManager - onShowIsFullScreenChanged: console.debug("Show is fullscreen hint for Qt applications:", showIsFullScreen) - }, - WlShell { - onShellSurfaceCreated: { - chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); - } - }, - XdgShell { - property variant viewsBySurface: ({}) - onXdgSurfaceCreated: { - var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } ); - viewsBySurface[xdgSurface.surface] = item; - } - onXdgPopupCreated: { - var parentView = viewsBySurface[xdgPopup.parentSurface]; - chromeComponent.createObject(parentView, { "shellSurface": xdgPopup } ); - } - }, - TextInputManager { + QtWindowManager { + id: qtWindowManager + onShowIsFullScreenChanged: console.debug("Show is fullscreen hint for Qt applications:", showIsFullScreen) + } + + WlShell { + onShellSurfaceCreated: { + chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); + } + } + + XdgShell { + property variant viewsBySurface: ({}) + onXdgSurfaceCreated: { + var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } ); + viewsBySurface[xdgSurface.surface] = item; } - ] + onXdgPopupCreated: { + var parentView = viewsBySurface[xdgPopup.parentSurface]; + chromeComponent.createObject(parentView, { "shellSurface": xdgPopup } ); + } + } + + TextInputManager { + } onCreateSurface: { var surface = surfaceComponent.createObject(comp, { } ); surface.initialize(comp, client, id, version); - } } |