diff options
author | Johan Klokkhammer Helsing <johan.helsing@theqtcompany.com> | 2016-02-26 13:10:36 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2016-04-26 12:29:04 +0000 |
commit | b04a737dc694064b4fd507f0f52a7b9537c09bc7 (patch) | |
tree | 335d18f572926e082affb7d9e682b7feb3502144 /examples/wayland/pure-qml/qml/main.qml | |
parent | 38cdbabc0fe92a105ac6f6accaa6e75a6d730e56 (diff) |
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 <pierluigi.fiorini@gmail.com>
Diffstat (limited to 'examples/wayland/pure-qml/qml/main.qml')
-rw-r--r-- | examples/wayland/pure-qml/qml/main.qml | 17 |
1 files changed, 17 insertions, 0 deletions
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 @@ -57,6 +57,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(); |