summaryrefslogtreecommitdiffstats
path: root/examples/wayland/pure-qml/qml/main.qml
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-05-11 14:28:56 +0200
committerJohan Helsing <johan.helsing@qt.io>2016-05-20 12:11:17 +0000
commit5e5e866c8c1fc8234c25770d84e9591041e67d69 (patch)
tree111913497f39e6cbad7403743ab40a5d9aed734c /examples/wayland/pure-qml/qml/main.qml
parent8817a981389b4f22a614f258f3575360645f2fd9 (diff)
Create a general ShellSurfaceItem to avoid duplication
XdgSurfaceItem and WlShellSurfaceItem have been removed in favor of the more general ShellSurfaceItem. An XdgSurface or a WlShellSurface can be assigned to the shellSurface property of a ShellSurfaceItem and leaves open the possibility for additional shells. A shared base class for QWaylandXdgSurface and QWaylandWlShellSurface has been added which has a factory method for creating a QWaylandQuickShellIntegration for that shell implementation. The property "shellSurface" on the ShellSurfaceItem allows QML code to attach to signals regardless of whether it's a WlShell or XdgShell client. The pure-qml example has been updated to take advantage of this. Change-Id: I9d3427586e100d6c44a24f319dd8e1486ff062ee Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Diffstat (limited to 'examples/wayland/pure-qml/qml/main.qml')
-rw-r--r--examples/wayland/pure-qml/qml/main.qml12
1 files changed, 1 insertions, 11 deletions
diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml
index c50d4b67d..6ee09f802 100644
--- a/examples/wayland/pure-qml/qml/main.qml
+++ b/examples/wayland/pure-qml/qml/main.qml
@@ -57,12 +57,6 @@ WaylandCompositor {
}
Component {
- id: xdgChromeComponent
- XdgChrome {
- }
- }
-
- Component {
id: surfaceComponent
WaylandSurface {
}
@@ -74,17 +68,13 @@ WaylandCompositor {
onShowIsFullScreenChanged: console.debug("Show is fullscreen hint for Qt applications:", showIsFullScreen)
},
WlShell {
- id: defaultShell
-
onShellSurfaceCreated: {
chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } );
}
},
XdgShell {
- id: xdgShell
-
onXdgSurfaceCreated: {
- xdgChromeComponent.createObject(defaultOutput.surfaceArea, { "xdgSurface": xdgSurface } );
+ chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } );
}
},
TextInputManager {