summaryrefslogtreecommitdiffstats
path: root/examples/wayland/pure-qml/qml/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/wayland/pure-qml/qml/main.qml')
-rw-r--r--examples/wayland/pure-qml/qml/main.qml53
1 files changed, 10 insertions, 43 deletions
diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml
index 7bf2a623c..b188ebbb5 100644
--- a/examples/wayland/pure-qml/qml/main.qml
+++ b/examples/wayland/pure-qml/qml/main.qml
@@ -52,54 +52,21 @@ import QtQuick 2.0
import QtWayland.Compositor 1.1
WaylandCompositor {
- id: comp
+ id: waylandCompositor
- property var primarySurfacesArea: null
-
- Screen {
- compositor: comp
- }
-
- Component {
- id: chromeComponent
- Chrome {
- }
- }
-
- Component {
- id: surfaceComponent
- WaylandSurface {
- }
- }
-
- QtWindowManager {
- id: qtWindowManager
- onShowIsFullScreenChanged: console.debug("Show is fullscreen hint for Qt applications:", showIsFullScreen)
- }
-
- WlShell {
- onWlShellSurfaceCreated: {
- chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } );
- }
- }
-
- XdgShellV5 {
- onXdgSurfaceCreated: {
- chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } );
- }
- }
+ Screen { id: screen; compositor: waylandCompositor }
+ // Shell surface extension. Needed to provide a window concept for Wayland clients.
+ // I.e. requests and events for maximization, minimization, resizing, closing etc.
XdgShellV6 {
- onToplevelCreated: {
- chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } );
- }
+ onToplevelCreated: screen.handleShellSurface(xdgSurface)
}
- TextInputManager {
+ // Deprecated shell extension, still used by some clients
+ WlShell {
+ onWlShellSurfaceCreated: screen.handleShellSurface(shellSurface)
}
- onSurfaceRequested: {
- var surface = surfaceComponent.createObject(comp, { } );
- surface.initialize(comp, client, id, version);
- }
+ // Extension for Virtual keyboard support
+ TextInputManager {}
}