diff options
Diffstat (limited to 'tests/manual/server-buffer/compositor/qml/main.qml')
-rw-r--r-- | tests/manual/server-buffer/compositor/qml/main.qml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/manual/server-buffer/compositor/qml/main.qml b/tests/manual/server-buffer/compositor/qml/main.qml new file mode 100644 index 00000000..484a9563 --- /dev/null +++ b/tests/manual/server-buffer/compositor/qml/main.qml @@ -0,0 +1,43 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtWayland.Compositor +import QtWayland.Compositor.WlShell +import QtQuick.Window + +import io.qt.examples.sharebufferextension + +WaylandCompositor { + WaylandOutput { + sizeFollowsWindow: true + window: Window { + width: 1024 + height: 768 + visible: true + Image { + id: surfaceArea + anchors.fill: parent + fillMode: Image.Tile + source: "qrc:/images/background.png" + smooth: false + } + } + } + + Component { + id: chromeComponent + ShellSurfaceItem { + onSurfaceDestroyed: destroy() + } + } + + WlShell { + onWlShellSurfaceCreated: (shellSurface) => { + chromeComponent.createObject(surfaceArea, { "shellSurface": shellSurface } ); + } + } + + ShareBufferExtension { + } +} |