diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/wayland/pure-qml/qml/main.qml | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml index 6ee450d43..9ed4acd24 100644 --- a/examples/wayland/pure-qml/qml/main.qml +++ b/examples/wayland/pure-qml/qml/main.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick 2.0 -import QtWayland.Compositor 1.0 +import QtWayland.Compositor 1.1 WaylandCompositor { id: comp @@ -83,8 +83,9 @@ WaylandCompositor { } } + property variant viewsBySurface: ({}) + XdgShellV5 { - property variant viewsBySurface: ({}) onXdgSurfaceCreated: { var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } ); viewsBySurface[xdgSurface.surface] = item; @@ -96,6 +97,19 @@ WaylandCompositor { } } + XdgShellV6 { + onToplevelCreated: { + var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } ); + viewsBySurface[xdgSurface.surface] = item; + } + onPopupCreated: { + var parentView = viewsBySurface[popup.parentXdgSurface.surface]; + var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } ); + viewsBySurface[xdgSurface.surface] = item; + //TODO: set popup position + } + } + TextInputManager { } |