diff options
Diffstat (limited to 'examples/wayland/pure-qml/qml')
-rw-r--r-- | examples/wayland/pure-qml/qml/main.qml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml index fb61aeacd..0d99275eb 100644 --- a/examples/wayland/pure-qml/qml/main.qml +++ b/examples/wayland/pure-qml/qml/main.qml @@ -73,8 +73,14 @@ WaylandCompositor { } }, XdgShell { + property variant viewsBySurface: ({}) onXdgSurfaceCreated: { - chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } ); + var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } ); + viewsBySurface[xdgSurface.surface] = item; + } + onXdgPopupCreated: { + var parentView = viewsBySurface[xdgPopup.parentSurface]; + chromeComponent.createObject(parentView, { "shellSurface": xdgPopup } ); } }, TextInputManager { |