From b04a737dc694064b4fd507f0f52a7b9537c09bc7 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 26 Feb 2016 13:10:36 +0100 Subject: QML API for xdg-shell Exposes QWaylandXdgShell and QWaylandXdgSurface as QML types, along with a new QWaylandXdgSurfaceItem. All of this mirrors the implementation of wl_shell closely. The biggest difference is how resize is handled. There is now some duplication in the window chrome implementation of the pure-qml compositor. This may be improved by refactoring the existing API for shell extensions. Change-Id: I4f2ceff7e0462034cd295a27c3eefea457cc9b96 Reviewed-by: Pier Luigi Fiorini --- examples/wayland/pure-qml/qml/main.qml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'examples/wayland/pure-qml/qml/main.qml') diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml index ac8dde712..65ac36166 100644 --- a/examples/wayland/pure-qml/qml/main.qml +++ b/examples/wayland/pure-qml/qml/main.qml @@ -56,6 +56,12 @@ WaylandCompositor { } } + Component { + id: xdgChromeComponent + XdgChrome { + } + } + Component { id: surfaceComponent WaylandSurface { @@ -82,6 +88,17 @@ WaylandCompositor { initialize(); } }, + XdgShell { + id: xdgShell + + onXdgSurfaceCreated: { + xdgChromeComponent.createObject(defaultOutput.surfaceArea, { "xdgSurface": xdgSurface } ); + } + + Component.onCompleted: { + initialize(); + } + }, TextInputManager { Component.onCompleted: { initialize(); -- cgit v1.2.3