From 5e5e866c8c1fc8234c25770d84e9591041e67d69 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Wed, 11 May 2016 14:28:56 +0200 Subject: 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 --- examples/wayland/pure-qml/qml/main.qml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'examples/wayland/pure-qml/qml/main.qml') 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 @@ -56,12 +56,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 { -- cgit v1.2.3