blob: 2e457d14738022f636f3c5a4601d28155b75da99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Window
import QtWayland.Compositor
import QtWayland.Compositor.XdgShell
import QtWayland.Compositor.WlShell
// importing the texture sharing extension:
import QtWayland.Compositor.TextureSharingExtension
WaylandCompositor {
WaylandOutput {
sizeFollowsWindow: true
window: Window {
width: 1024
height: 768
visible: true
Repeater {
model: shellSurfaces
ShellSurfaceItem {
shellSurface: modelData
onSurfaceDestroyed: shellSurfaces.remove(index)
}
}
}
}
WlShell {
onWlShellSurfaceCreated:
shellSurfaces.append({shellSurface: shellSurface});
}
XdgShell {
onToplevelCreated:
shellSurfaces.append({shellSurface: xdgSurface});
}
ListModel { id: shellSurfaces }
// instantiating the texture sharing extension:
TextureSharingExtension {
imageSearchPath: ".;/tmp;/usr/share/pixmaps"
}
}
|