diff options
Diffstat (limited to 'examples/wayland/pure-qml/qml/main.qml')
-rw-r--r-- | examples/wayland/pure-qml/qml/main.qml | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml index 6ee09f802..69e8d2c84 100644 --- a/examples/wayland/pure-qml/qml/main.qml +++ b/examples/wayland/pure-qml/qml/main.qml @@ -62,28 +62,34 @@ WaylandCompositor { } } - extensions: [ - WindowManager { - id: qtWindowManager - onShowIsFullScreenChanged: console.debug("Show is fullscreen hint for Qt applications:", showIsFullScreen) - }, - WlShell { - onShellSurfaceCreated: { - chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); - } - }, - XdgShell { - onXdgSurfaceCreated: { - chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } ); - } - }, - TextInputManager { + QtWindowManager { + id: qtWindowManager + onShowIsFullScreenChanged: console.debug("Show is fullscreen hint for Qt applications:", showIsFullScreen) + } + + WlShell { + onWlShellSurfaceCreated: { + 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 } ); + } + } - onCreateSurface: { + TextInputManager { + } + + onSurfaceRequested: { var surface = surfaceComponent.createObject(comp, { } ); surface.initialize(comp, client, id, version); - } } |