summaryrefslogtreecommitdiffstats
path: root/examples/qml-compositor/WindowContainer.qml
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2014-03-31 17:18:43 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-29 11:17:45 +0200
commitbb37532f36862eb29e033508d1c6c5dbc8c2be13 (patch)
treefa9d2e8300bf07f07e2c49b35e1bb936fbe8bc90 /examples/qml-compositor/WindowContainer.qml
parent96ab8abe0b0faea7f63f0477025fe0649e410362 (diff)
Split QWaylandSurface in a model and view fashion
QtQuick compositors already use a view class (QWaylandSurfaceItem), so add a new QWaylandSurfaceView, which is subclassed by QWaylandSurfaceItem, and move the view related methods of QWaylandSurface there. A QWaylandSurface can have many views. Change-Id: I7e92fe1f7e9d252f5f40a3097feabb5f3318b03a Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'examples/qml-compositor/WindowContainer.qml')
-rw-r--r--examples/qml-compositor/WindowContainer.qml22
1 files changed, 9 insertions, 13 deletions
diff --git a/examples/qml-compositor/WindowContainer.qml b/examples/qml-compositor/WindowContainer.qml
index 77dd1d4dc..8d25327cc 100644
--- a/examples/qml-compositor/WindowContainer.qml
+++ b/examples/qml-compositor/WindowContainer.qml
@@ -57,16 +57,6 @@ Item {
console.log("visibility changed: " + visible);
}
- WaylandSurfaceItem {
- id: surfaceItem
- anchors.fill: parent
- touchEventsEnabled: true
-
- onSurfaceDestroyed: {
- destroyAnimation.start();
- }
- }
-
opacity: 0
property real targetX
@@ -75,7 +65,7 @@ Item {
property real targetHeight
property real targetScale
- property variant child: surfaceItem
+ property variant child: null
property variant chrome: null
property bool animationsEnabled: false
property bool isFullscreen: state === "fullscreen"
@@ -116,7 +106,7 @@ Item {
ContrastEffect {
id: effect
source: child
- anchors.fill: child
+ anchors.fill: parent
blend: { if (child && chrome && (chrome.selected || child.focus)) 0.0; else 0.6 }
opacity: 1.0
z: 1
@@ -188,9 +178,15 @@ Item {
}
Connections {
- target: container.child.surface
+ target: container.child ? container.child.surface : null
onUnmapped: unmapAnimation.start()
}
+ Connections {
+ target: container.child
+ onSurfaceDestroyed: {
+ destroyAnimation.start();
+ }
+ }
Image {
source: "closebutton.png"