on xenial help sign in
fixed occlusion exceptions
bd79d3bNick Dedekind
qml/Stages/DesktopStage.qml+3
@@ -159,9 +159,12 @@ AbstractStage {
159 onVisuallyMaximizedChanged: priv.updateForegroundMaximizedApp()
159 onVisuallyMaximizedChanged: priv.updateForegroundMaximizedApp()
160
160
161 visible: !visuallyMinimized &&
161 visible: !visuallyMinimized &&
162+ !greeter.fullyShown &&
162 (priv.foregroundMaximizedAppIdIndex === -1 || priv.foregroundMaximizedAppIdIndex >= index) ||
163 (priv.foregroundMaximizedAppIdIndex === -1 || priv.foregroundMaximizedAppIdIndex >= index) ||
163 (spread.state == "altTab" && index === spread.highlightedIndex)
164 (spread.state == "altTab" && index === spread.highlightedIndex)
164
165
166+ onVisibleChanged: console.log("VISIBLE", model.appId, visible)
167+
165 Binding {
168 Binding {
166 target: ApplicationManager.get(index)
169 target: ApplicationManager.get(index)
167 property: "requestedState"
170 property: "requestedState"
qml/Stages/PhoneStage.qml+8−4
@@ -183,7 +183,8 @@ AbstractStage {
183 }
183 }
184 }
184 }
185
185
186− property bool focusedAppDelegateIsDislocated: focusedAppDelegate && focusedAppDelegate.x !== 0
186+ property bool focusedAppDelegateIsDislocated: focusedAppDelegate &&
187+ (focusedAppDelegate.x !== 0 || focusedAppDelegate.xBehavior.running)
187
188
188 function indexOf(appId) {
189 function indexOf(appId) {
189 for (var i = 0; i < root.applicationManager.count; i++) {
190 for (var i = 0; i < root.applicationManager.count; i++) {
@@ -474,7 +475,6 @@ AbstractStage {
474
475
475 property var xBehavior: xBehavior
476 property var xBehavior: xBehavior
476 Behavior on x {
477 Behavior on x {
477− id: xBehavior
478 enabled: root.spreadEnabled &&
478 enabled: root.spreadEnabled &&
479 !spreadView.active &&
479 !spreadView.active &&
480 !snapAnimation.running &&
480 !snapAnimation.running &&
@@ -482,6 +482,7 @@ AbstractStage {
482 priv.animateX &&
482 priv.animateX &&
483 !root.beingResized
483 !root.beingResized
484 UbuntuNumberAnimation {
484 UbuntuNumberAnimation {
485+ id: xBehavior
485 duration: UbuntuAnimation.BriskDuration
486 duration: UbuntuAnimation.BriskDuration
486 }
487 }
487 }
488 }
@@ -524,12 +525,15 @@ AbstractStage {
524 // Hide tile when progress is such that it will be off screen.
525 // Hide tile when progress is such that it will be off screen.
525 property bool occluded: {
526 property bool occluded: {
526 if (spreadView.active && (progress >= 0 && progress < 1.7)) return false;
527 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;
528 return true;
531 return true;
529 }
532 }
530
533
531 visible: Powerd.status == Powerd.On &&
534 visible: Powerd.status == Powerd.On &&
532− (!occluded || (isDash && priv.focusedAppDelegateIsDislocated))
535+ !greeter.fullyShown &&
536+ !occluded
533
537
534 shellOrientationAngle: root.shellOrientationAngle
538 shellOrientationAngle: root.shellOrientationAngle
535 shellOrientation: root.shellOrientation
539 shellOrientation: root.shellOrientation
qml/Stages/TabletStage.qml+10−2
@@ -1,4 +1,4 @@
1−/*
1+/*
2 * Copyright (C) 2014-2015 Canonical, Ltd.
2 * Copyright (C) 2014-2015 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
@@ -19,6 +19,7 @@ import Ubuntu.Components 0.1
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20import Unity.Application 0.1
20import Unity.Application 0.1
21import Utils 0.1
21import Utils 0.1
22+import Powerd 0.1
22import "../Components"
23import "../Components"
23
24
24AbstractStage {
25AbstractStage {
@@ -146,6 +147,8 @@ AbstractStage {
146 }
147 }
147 }
148 }
148
149
150+ property bool focusedAppDelegateIsDislocated: focusedAppDelegate &&
151+ (focusedAppDelegate.dragOffset !== 0 || focusedAppDelegate.xTranslateAnimating)
149 function indexOf(appId) {
152 function indexOf(appId) {
150 for (var i = 0; i < ApplicationManager.count; i++) {
153 for (var i = 0; i < ApplicationManager.count; i++) {
151 if (ApplicationManager.get(i).appId == appId) {
154 if (ApplicationManager.get(i).appId == appId) {
@@ -663,9 +666,14 @@ AbstractStage {
663 property bool occluded: {
666 property bool occluded: {
664 if (spreadView.active) return false;
667 if (spreadView.active) return false;
665 else if (spreadTile.active) return false;
668 else if (spreadTile.active) return false;
669+ else if (xTranslateAnimating) return false;
670+ else if (z <= 1 && priv.focusedAppDelegateIsDislocated) return false;
666 return true;
671 return true;
667 }
672 }
673+
674+ visible: Powerd.status == Powerd.On &&
675+ !greeter.fullyShown &&
668− visible: !occluded
676+ !occluded
669
677
670 animatedProgress: {
678 animatedProgress: {
671 if (spreadView.phase == 0 && (spreadTile.active || spreadView.nextInStack == index)) {
679 if (spreadView.phase == 0 && (spreadTile.active || spreadView.nextInStack == index)) {
qml/Stages/TransformedTabletSpreadDelegate.qml+2
@@ -48,6 +48,7 @@ SpreadDelegate {
48 property bool isInSideStage: false
48 property bool isInSideStage: false
49
49
50 property int dragOffset: 0
50 property int dragOffset: 0
51+ readonly property alias xTranslateAnimating: xTranslateAnimation.running
51
52
52 dropShadow: spreadView.active ||
53 dropShadow: spreadView.active ||
53 (active
54 (active
@@ -144,6 +145,7 @@ SpreadDelegate {
144 spreadView.animateX &&
145 spreadView.animateX &&
145 !spreadView.beingResized
146 !spreadView.beingResized
146 UbuntuNumberAnimation {
147 UbuntuNumberAnimation {
148+ id: xTranslateAnimation
147 duration: UbuntuAnimation.FastDuration
149 duration: UbuntuAnimation.FastDuration
148 }
150 }
149 }
151 }
tests/qmltests/Stages/tst_DesktopStage.qml+4
@@ -23,12 +23,15 @@ import Unity.Test 0.1
23import Utils 0.1
23import Utils 0.1
24
24
25import "../../../qml/Stages"
25import "../../../qml/Stages"
26+import "../../../qml/Components"
26
27
27Item {
28Item {
28 id: root
29 id: root
29 width: desktopStageLoader.width + controls.width
30 width: desktopStageLoader.width + controls.width
30 height: desktopStageLoader.height
31 height: desktopStageLoader.height
31
32
33+ property var greeter: { fullyShown: true }
34+
32 Binding {
35 Binding {
33 target: MouseTouchAdaptor
36 target: MouseTouchAdaptor
34 property: "enabled"
37 property: "enabled"
@@ -65,6 +68,7 @@ Item {
65 Component.onDestruction: {
68 Component.onDestruction: {
66 desktopStageLoader.itemDestroyed = true;
69 desktopStageLoader.itemDestroyed = true;
67 }
70 }
71+ orientations: Orientations {}
68 }
72 }
69 }
73 }
70 }
74 }
tests/qmltests/Stages/tst_PhoneStage.qml+4
@@ -19,6 +19,7 @@ import QtTest 1.0
19import Unity.Test 0.1 as UT
19import Unity.Test 0.1 as UT
20import ".."
20import ".."
21import "../../../qml/Stages"
21import "../../../qml/Stages"
22+import "../../../qml/Components"
22import Ubuntu.Components 0.1
23import Ubuntu.Components 0.1
23import Unity.Application 0.1
24import Unity.Application 0.1
24
25
@@ -26,6 +27,8 @@ Item {
26 width: units.gu(70)
27 width: units.gu(70)
27 height: units.gu(70)
28 height: units.gu(70)
28
29
30+ property var greeter: { fullyShown: true }
31+
29 PhoneStage {
32 PhoneStage {
30 id: phoneStage
33 id: phoneStage
31 anchors { fill: parent; rightMargin: units.gu(30) }
34 anchors { fill: parent; rightMargin: units.gu(30) }
@@ -34,6 +37,7 @@ Item {
34 maximizedAppTopMargin: units.gu(3) + units.dp(2)
37 maximizedAppTopMargin: units.gu(3) + units.dp(2)
35 interactive: true
38 interactive: true
36 shellOrientation: Qt.PortraitOrientation
39 shellOrientation: Qt.PortraitOrientation
40+ orientations: Orientations {}
37 }
41 }
38
42
39 Binding {
43 Binding {
tests/qmltests/Stages/tst_TabletStage.qml+2
@@ -30,6 +30,8 @@ Rectangle {
30 width: tabletStageLoader.width + controls.width
30 width: tabletStageLoader.width + controls.width
31 height: tabletStageLoader.height
31 height: tabletStageLoader.height
32
32
33+ property var greeter: { fullyShown: true }
34+
33 Loader {
35 Loader {
34 id: tabletStageLoader
36 id: tabletStageLoader
35
37