summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-05-20 13:40:07 +0200
committerJohan Helsing <johan.helsing@qt.io>2016-06-15 08:07:32 +0000
commita0c54d6435edd23a7eaacef73b074475730ec208 (patch)
tree36e08f755563c82f3a03cc878f9fc0f3667b6f6c /examples
parent5fbb2043a1be8b14e70335c2b2db77702e52fa10 (diff)
Add QML popup support for xdg_shell
Change-Id: I5b35ff3b1c6c2dc884b52e6f077c0f2bb2db68a2 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/wayland/pure-qml/qml/main.qml8
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 {