summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-09-29 12:45:04 +0200
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-09-29 11:50:45 +0000
commit22916e25e91d901c98e45f993afc7e203686d248 (patch)
treed805a9d70029e0844d34f0db29132ca260e260da /examples
parent8b2c8f22b0157311ff5a0e1df4b24fc568a15660 (diff)
downloadqtwayland-22916e25e91d901c98e45f993afc7e203686d248.tar.gz
Add raise() and lower() to QWaylandQuickItem
Change-Id: Idbd0ec7e8b77f6241aa6ac91639d76a0ffe2dae9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/wayland/multi-output/qml/GridScreen.qml5
-rw-r--r--examples/wayland/multi-output/qml/main.qml3
2 files changed, 7 insertions, 1 deletions
diff --git a/examples/wayland/multi-output/qml/GridScreen.qml b/examples/wayland/multi-output/qml/GridScreen.qml
index 83f9c320..e7293731 100644
--- a/examples/wayland/multi-output/qml/GridScreen.qml
+++ b/examples/wayland/multi-output/qml/GridScreen.qml
@@ -66,12 +66,17 @@ WaylandOutput {
cellWidth: 200
cellHeight: 200
delegate: WaylandQuickItem {
+ id: item
surface: gridSurface
width: gridView.cellWidth
height: gridView.cellHeight
sizeFollowsSurface: false
inputEventsEnabled: false
view.discardFrontBuffers: true
+ MouseArea {
+ anchors.fill: parent
+ onClicked: item.surface.activated()
+ }
}
}
}
diff --git a/examples/wayland/multi-output/qml/main.qml b/examples/wayland/multi-output/qml/main.qml
index 0a479157..e04f3cac 100644
--- a/examples/wayland/multi-output/qml/main.qml
+++ b/examples/wayland/multi-output/qml/main.qml
@@ -65,6 +65,7 @@ WaylandCompositor {
id: surfaceComponent
WaylandSurface {
id: surface
+ signal activated()
onMappedChanged: {
if (isMapped && !cursorSurface) {
gridScreen.gridSurfaces.append( { "gridSurface" : surface } );
@@ -87,7 +88,7 @@ WaylandCompositor {
onCreateShellSurface: {
var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "surface": surface } );
item.shellSurface.initialize(defaultShell, surface, client, id);
- item.surface
+ surface.activated.connect(item.raise);
}
Component.onCompleted: {