on xenial help sign in
fixed occlusion exceptions
commitbd79d3b90c07ad53536b4a0544cfb94fb79de9f3 authorNick Dedekind <nick.dedekind@canonical.com> dateWed 4 Nov 2015, 13:30 (11 years ago) parent7e21c71
7 files changed+33−6
qml/Stages/DesktopStage.qml+3 qml/Stages/PhoneStage.qml+8−4 qml/Stages/TabletStage.qml+10−2 qml/Stages/TransformedTabletSpreadDelegate.qml+2 tests/qmltests/Stages/tst_DesktopStage.qml+4 tests/qmltests/Stages/tst_PhoneStage.qml+4 tests/qmltests/Stages/tst_TabletStage.qml+2
qml/Stages/DesktopStage.qml+3
@@ -159,9 +159,12 @@ AbstractStage {
159159 onVisuallyMaximizedChanged: priv.updateForegroundMaximizedApp()
160160
161161 visible: !visuallyMinimized &&
162+ !greeter.fullyShown &&
162163 (priv.foregroundMaximizedAppIdIndex === -1 || priv.foregroundMaximizedAppIdIndex >= index) ||
163164 (spread.state == "altTab" && index === spread.highlightedIndex)
164165
166+ onVisibleChanged: console.log("VISIBLE", model.appId, visible)
167+
165168 Binding {
166169 target: ApplicationManager.get(index)
167170 property: "requestedState"
qml/Stages/PhoneStage.qml+8−4
@@ -183,7 +183,8 @@ AbstractStage {
183183 }
184184 }
185185
186− property bool focusedAppDelegateIsDislocated: focusedAppDelegate && focusedAppDelegate.x !== 0
186+ property bool focusedAppDelegateIsDislocated: focusedAppDelegate &&
187+ (focusedAppDelegate.x !== 0 || focusedAppDelegate.xBehavior.running)
187188
188189 function indexOf(appId) {
189190 for (var i = 0; i < root.applicationManager.count; i++) {
@@ -474,7 +475,6 @@ AbstractStage {
474475
475476 property var xBehavior: xBehavior
476477 Behavior on x {
477− id: xBehavior
478478 enabled: root.spreadEnabled &&
479479 !spreadView.active &&
480480 !snapAnimation.running &&
@@ -482,6 +482,7 @@ AbstractStage {
482482 priv.animateX &&
483483 !root.beingResized
484484 UbuntuNumberAnimation {
485+ id: xBehavior
485486 duration: UbuntuAnimation.BriskDuration
486487 }
487488 }
@@ -524,12 +525,15 @@ AbstractStage {
524525 // Hide tile when progress is such that it will be off screen.
525526 property bool occluded: {
526527 if (spreadView.active && (progress >= 0 && progress < 1.7)) return false;
527− if (!spreadView.active && isFocused) return false;
528+ else if (!spreadView.active && isFocused) return false;
529+ else if (xBehavior.running) return false;
530+ else if (z <= 1 && priv.focusedAppDelegateIsDislocated) return false;
528531 return true;
529532 }
530533
531534 visible: Powerd.status == Powerd.On &&
532− (!occluded || (isDash && priv.focusedAppDelegateIsDislocated))
535+ !greeter.fullyShown &&
536+ !occluded
533537
534538 shellOrientationAngle: root.shellOrientationAngle
535539 shellOrientation: root.shellOrientation
qml/Stages/TabletStage.qml+10−2
@@ -1,4 +1,4 @@
1−/*
1+/*
22 * Copyright (C) 2014-2015 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
@@ -19,6 +19,7 @@ import Ubuntu.Components 0.1
1919import Ubuntu.Gestures 0.1
2020import Unity.Application 0.1
2121import Utils 0.1
22+import Powerd 0.1
2223import "../Components"
2324
2425AbstractStage {
@@ -146,6 +147,8 @@ AbstractStage {
146147 }
147148 }
148149
150+ property bool focusedAppDelegateIsDislocated: focusedAppDelegate &&
151+ (focusedAppDelegate.dragOffset !== 0 || focusedAppDelegate.xTranslateAnimating)
149152 function indexOf(appId) {
150153 for (var i = 0; i < ApplicationManager.count; i++) {
151154 if (ApplicationManager.get(i).appId == appId) {
@@ -663,9 +666,14 @@ AbstractStage {
663666 property bool occluded: {
664667 if (spreadView.active) return false;
665668 else if (spreadTile.active) return false;
669+ else if (xTranslateAnimating) return false;
670+ else if (z <= 1 && priv.focusedAppDelegateIsDislocated) return false;
666671 return true;
667672 }
668− visible: !occluded
673+
674+ visible: Powerd.status == Powerd.On &&
675+ !greeter.fullyShown &&
676+ !occluded
669677
670678 animatedProgress: {
671679 if (spreadView.phase == 0 && (spreadTile.active || spreadView.nextInStack == index)) {
qml/Stages/TransformedTabletSpreadDelegate.qml+2
@@ -48,6 +48,7 @@ SpreadDelegate {
4848 property bool isInSideStage: false
4949
5050 property int dragOffset: 0
51+ readonly property alias xTranslateAnimating: xTranslateAnimation.running
5152
5253 dropShadow: spreadView.active ||
5354 (active
@@ -144,6 +145,7 @@ SpreadDelegate {
144145 spreadView.animateX &&
145146 !spreadView.beingResized
146147 UbuntuNumberAnimation {
148+ id: xTranslateAnimation
147149 duration: UbuntuAnimation.FastDuration
148150 }
149151 }
tests/qmltests/Stages/tst_DesktopStage.qml+4
@@ -23,12 +23,15 @@ import Unity.Test 0.1
2323import Utils 0.1
2424
2525import "../../../qml/Stages"
26+import "../../../qml/Components"
2627
2728Item {
2829 id: root
2930 width: desktopStageLoader.width + controls.width
3031 height: desktopStageLoader.height
3132
33+ property var greeter: { fullyShown: true }
34+
3235 Binding {
3336 target: MouseTouchAdaptor
3437 property: "enabled"
@@ -65,6 +68,7 @@ Item {
6568 Component.onDestruction: {
6669 desktopStageLoader.itemDestroyed = true;
6770 }
71+ orientations: Orientations {}
6872 }
6973 }
7074 }
tests/qmltests/Stages/tst_PhoneStage.qml+4
@@ -19,6 +19,7 @@ import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import ".."
2121import "../../../qml/Stages"
22+import "../../../qml/Components"
2223import Ubuntu.Components 0.1
2324import Unity.Application 0.1
2425
@@ -26,6 +27,8 @@ Item {
2627 width: units.gu(70)
2728 height: units.gu(70)
2829
30+ property var greeter: { fullyShown: true }
31+
2932 PhoneStage {
3033 id: phoneStage
3134 anchors { fill: parent; rightMargin: units.gu(30) }
@@ -34,6 +37,7 @@ Item {
3437 maximizedAppTopMargin: units.gu(3) + units.dp(2)
3538 interactive: true
3639 shellOrientation: Qt.PortraitOrientation
40+ orientations: Orientations {}
3741 }
3842
3943 Binding {
tests/qmltests/Stages/tst_TabletStage.qml+2
@@ -30,6 +30,8 @@ Rectangle {
3030 width: tabletStageLoader.width + controls.width
3131 height: tabletStageLoader.height
3232
33+ property var greeter: { fullyShown: true }
34+
3335 Loader {
3436 id: tabletStageLoader
3537