import QtQuick 2.0
import QtWayland.Compositor 1.0
import QtQuick.Window 2.2

WaylandCompositor {
    id: wlcompositor
    WaylandOutput {
        sizeFollowsWindow: true
        compositor: wlcompositor
        window: Window {
            width: 1024
            height: 768
            visible: true
            Repeater {
                model: shellSurfaces
                ShellSurfaceItem {
                    shellSurface: modelData
                    onSurfaceDestroyed: shellSurfaces.remove(index)
                }
            }
        }
    }
    ListModel {
        id: shellSurfaces
    }
    WlShell {
        onWlShellSurfaceCreated: shellSurfaces.append({"shellSurface": shellSurface })
    }
    XdgShellV5 {
        onXdgSurfaceCreated: shellSurfaces.append({"shellSurface": xdgSurface })
    }
}