From e459125d971d1a0c548a63a1286cb839936a8772 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Thu, 1 Dec 2016 18:00:05 +0100 Subject: Compositor: Add support for xdg-shell-unstable-v6 This adds QML and C++ support for xdg-shell-unstable v6 on the compositor side. A couple of things are still missing for complete support, but can be added implemented later without breaking the API. Task-number: QTBUG-56174 Change-Id: I08d7c05aa4f40f00377d92f2519d89ab416daaf4 Reviewed-by: Paul Olav Tvete --- examples/wayland/pure-qml/qml/main.qml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'examples/wayland') 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 { } -- cgit v1.2.3