@@ -21,6 +21,7 @@ import Unity.Application 0.1
21import Ubuntu.Components 0.1
21import Ubuntu.Components 0.1
22import Ubuntu.Gestures 0.1
22import Ubuntu.Gestures 0.1
23import Unity.Launcher 0.1
23import Unity.Launcher 0.1
24import LightDM 0.1 as LightDM
25import LightDM 0.1 as LightDM
25import Powerd 0.1
26import Powerd 0.1
26import SessionBroadcast 0.1
27import SessionBroadcast 0.1
@@ -30,10 +31,11 @@ import "Launcher"
30import "Panel"
31import "Panel"
31import "Components"
32import "Components"
32import "Notifications"
33import "Notifications"
33import Unity.Notifications 1.0 as NotificationBackend
35import Unity.Notifications 1.0 as NotificationBackend
34import Unity.Session 0.1
36import Unity.Session 0.1
39 // this is only here to select the width / height of the window if not running fullscreen
41 // this is only here to select the width / height of the window if not running fullscreen
@@ -46,7 +48,7 @@ FocusScope {
46 property url background
48 property url background
47 readonly property real panelHeight: panel.panelHeight
49 readonly property real panelHeight: panel.panelHeight
49− property bool dashShown: dash.shown
51+ property bool dashShown: dash.shown && dash.available && underlay.visible
51 property bool sideStageEnabled: shell.width >= units.gu(100)
53 property bool sideStageEnabled: shell.width >= units.gu(100)
52 readonly property string focusedApplicationId: ApplicationManager.focusedApplicationId
54 readonly property string focusedApplicationId: ApplicationManager.focusedApplicationId
@@ -54,14 +56,10 @@ FocusScope {
54 function activateApplication(appId) {
56 function activateApplication(appId) {
55 if (ApplicationManager.findApplication(appId)) {
57 if (ApplicationManager.findApplication(appId)) {
56 ApplicationManager.requestFocusApplication(appId);
58 ApplicationManager.requestFocusApplication(appId);
58− if (stages.locked && ApplicationManager.focusedApplicationId == appId) {
59− applicationsDisplayLoader.item.select(appId);
62 var execFlags = shell.sideStageEnabled ? ApplicationManager.NoFlag : ApplicationManager.ForceMainStage;
60 var execFlags = shell.sideStageEnabled ? ApplicationManager.NoFlag : ApplicationManager.ForceMainStage;
63 ApplicationManager.startApplication(appId, execFlags);
61 ApplicationManager.startApplication(appId, execFlags);
64− stages.show(false);
62+ stages.show();
@@ -88,82 +86,74 @@ FocusScope {
88 id: volumeControl
86 id: volumeControl
90+ // Handle but do not filter out volume keys
91− Keys.onVolumeUpPressed: volumeControl.volumeUp()
91+ Keys.onVolumeUpPressed: { volumeControl.volumeUp(); event.accepted = false; }
92− Keys.onVolumeDownPressed: volumeControl.volumeDown()
92+ Keys.onVolumeDownPressed: { volumeControl.volumeDown(); event.accepted = false; }
94− Item {
94+ Keys.onPressed: {
95− id: underlayClipper
95+ if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
96− anchors.fill: parent
96+ dialogs.onPowerKeyPressed();
97− anchors.rightMargin: stages.overlayWidth
97+ event.accepted = true;
98− clip: stages.overlayMode && !stages.painting
98+ } else {
99−
99+ event.accepted = false;
100− InputFilterArea {
100+ }
101− anchors.fill: parent
102− blockInput: parent.clip
105− Item {
103+ Keys.onReleased: {
106− id: underlay
104+ if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
107− objectName: "underlay"
105+ dialogs.onPowerKeyReleased();
108− anchors.fill: parent
106+ event.accepted = true;
109− anchors.rightMargin: -parent.anchors.rightMargin
107+ } else {
108+ event.accepted = false;
111− // Whether the underlay is fully covered by opaque UI elements.
113+ Item {
112− property bool fullyCovered: panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth
114+ id: underlay
115+ objectName: "underlay"
116+ anchors.fill: parent
114− // Whether the user should see the topmost application surface (if there's one at all).
118+ // Whether the underlay is fully covered by opaque UI elements.
115− readonly property bool applicationSurfaceShouldBeSeen: stages.shown && !stages.painting && !stages.overlayMode
119+ property bool fullyCovered: (panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth)
120+ || stages.fullyShown || greeterWrapper.fullyShown
121+ visible: !fullyCovered
125+ source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
126+ fillMode: Image.PreserveAspectCrop
127+ horizontalAlignment: Image.AlignRight
128+ verticalAlignment: Image.AlignTop
117− // NB! Application surfaces are stacked behind the shell one. So they can only be seen by the user
131+ Dash {
118− // through the translucent parts of the shell surface.
132+ id: dash
119− visible: !fullyCovered && !applicationSurfaceShouldBeSeen
133+ objectName: "dash"
121− Rectangle {
135+ available: !LightDM.Greeter.active
122− anchors.fill: parent
136+ hides: [stages, launcher, panel.indicators]
123− color: "black"
137+ shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0 &&
124− opacity: dash.disappearingAnimationProgress
138+ !(panel.indicators.fullyOpened && !sideStageEnabled)
125− }
139+ enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
127− Image {
141+ anchors {
128− anchors.fill: dash
142+ fill: parent
129− source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
143+ topMargin: panel.panelHeight
130− fillMode: Image.PreserveAspectCrop
131− horizontalAlignment: Image.AlignRight
132− verticalAlignment: Image.AlignTop
135− Dash {
146+ contentScale: 1.0 - 0.2 * disappearingAnimationProgress
136− id: dash
147+ opacity: 1.0 - disappearingAnimationProgress
137− objectName: "dash"
148+ property real disappearingAnimationProgress: stages.showProgress
139− available: !greeter.shown && !lockscreen.shown
140− hides: [stages, launcher, panel.indicators]
141− shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0
142− enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
146− topMargin: panel.panelHeight
149− contentScale: 1.0 - 0.2 * disappearingAnimationProgress
150− opacity: 1.0 - disappearingAnimationProgress
151− property real disappearingAnimationProgress: {
152− if (stages.overlayMode) {
155− return stages.showProgress
159− // FIXME: only necessary because stages.showProgress is not animated
150+ // FIXME: only necessary because stages.showProgress is not animated
160− Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
151+ Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
165 EdgeDragArea {
155 EdgeDragArea {
166− id: stagesDragHandle
156+ id: stagesDragArea
167 direction: Direction.Leftwards
157 direction: Direction.Leftwards
169 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
159 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
@@ -173,20 +163,20 @@ FocusScope {
174 onTouchXChanged: {
164 onTouchXChanged: {
175 if (status == DirectionalDragArea.Recognized) {
165 if (status == DirectionalDragArea.Recognized) {
176− if (ApplicationManager.count == 0) {
166+ if (ApplicationManager.empty) {
177− progress = Math.max(stages.width - stagesDragHandle.width + touchX, stages.width * .3)
167+ progress = Math.max(stages.width - stagesDragArea.width + touchX, stages.width * .3);
179− progress = stages.width - stagesDragHandle.width + touchX
169+ progress = stages.width - stagesDragArea.width + touchX;
184 onDraggingChanged: {
174 onDraggingChanged: {
185 if (!dragging) {
175 if (!dragging) {
186− if (ApplicationManager.count > 0 && progress < stages.width - units.gu(10)) {
176+ if (!ApplicationManager.empty && progress < stages.width - units.gu(10)) {
187− stages.show(true)
177+ stages.show();
189− stagesDragHandle.progress = stages.width;
179+ stagesDragArea.progress = Qt.binding(function () { return stages.width; });
@@ -197,98 +187,85 @@ FocusScope {
197 width: parent.width
187 width: parent.width
198 height: parent.height
188 height: parent.height
190+ visible: !fullyHidden && !ApplicationManager.empty
201 if (shown) {
193 if (shown) {
202− if (overlayMode || locked) {
194+ if (locked || greeter.fakeActiveForApp !== "") {
203 return 0;
195 return 0;
205− return launcher.progress
197+ return launcher.progress;
207− return stagesDragHandle.progress
199+ return stagesDragArea.progress
211 Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
202 Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
213 property bool shown: false
204 property bool shown: false
207+ if (ApplicationManager.count > 0) {
208+ ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
211+ if (ApplicationManager.focusedApplicationId) {
212+ ApplicationManager.updateScreenshot(ApplicationManager.focusedApplicationId);
213+ ApplicationManager.unfocusCurrentApplication();
218+ // Avoid a silent "divide by zero -> NaN" situation during init as shell.width will be
219+ // zero. That breaks the property binding and the function won't be reevaluated once
220+ // shell.width is set, with the NaN result staying there for good.
215− property real showProgress: overlayMode ? 0 : MathUtils.clamp(1 - x / shell.width, 0, 1)
221+ property real showProgress: shell.width ? MathUtils.clamp(1 - x / shell.width, 0, 1) : 0
217 property bool fullyShown: x == 0
223 property bool fullyShown: x == 0
218 property bool fullyHidden: x == width
224 property bool fullyHidden: x == width
220− property bool painting: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.painting : false
221− property bool fullscreen: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.fullscreen : false
222− property bool overlayMode: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.overlayMode : false
223− property int overlayWidth: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.overlayWidth : false
224 property bool locked: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.locked : false
226 property bool locked: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.locked : false
228+ // It might technically not be fullyShown but visually it just looks so.
229+ property bool roughlyFullyShown: x >= 0 && x <= units.gu(1)
226− function show(focusApp) {
231+ function show() {
227 shown = true;
232 shown = true;
228− panel.indicators.hide();
229− edgeDemo.stopDemo();
231− if (!ApplicationManager.focusedApplicationId && ApplicationManager.count > 0 && focusApp) {
232− ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
236 function hide() {
235 function hide() {
237 shown = false;
236 shown = false;
238− if (ApplicationManager.focusedApplicationId) {
239− ApplicationManager.unfocusCurrentApplication();
243 Connections {
239 Connections {
244 target: ApplicationManager
240 target: ApplicationManager
246 onFocusRequested: {
241 onFocusRequested: {
242+ if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== appId) {
247− stages.show(true);
246+ stages.show();
250 onFocusedApplicationIdChanged: {
249 onFocusedApplicationIdChanged: {
251− if (ApplicationManager.focusedApplicationId.length > 0) {
250+ if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== ApplicationManager.focusedApplicationId) {
252− stages.show(false);
251+ lockscreen.show();
254− if (!stages.overlayMode) {
253+ panel.indicators.hide();
260 onApplicationAdded: {
256 onApplicationAdded: {
261− stages.show(false);
257+ if (greeter.shown) {
262− }
258+ greeter.hide();
264− onApplicationRemoved: {
265− if (ApplicationManager.focusedApplicationId.length == 0) {
268− }
260+ if (!stages.shown) {
269− }
261+ stages.show();
272− target: DBusUnitySessionService
274− function closeAllApps() {
276− var app = ApplicationManager.get(0);
280− ApplicationManager.stopApplication(app.appId);
284− onLogoutRequested: {
265+ onEmptyChanged: {
285− // TODO: Display a dialog to ask the user to confirm.
266+ if (ApplicationManager.empty) {
286− DBusUnitySessionService.Logout();
267+ stages.hide();
@@ -296,22 +273,61 @@ FocusScope {
296 id: applicationsDisplayLoader
273 id: applicationsDisplayLoader
297 anchors.fill: parent
274 anchors.fill: parent
299− source: shell.sideStageEnabled ? "Stages/StageWithSideStage.qml" : "Stages/PhoneStage.qml"
276+ source: shell.sideStageEnabled ? "Stages/TabletStage.qml" : "Stages/PhoneStage.qml"
301 Binding {
278 Binding {
302 target: applicationsDisplayLoader.item
279 target: applicationsDisplayLoader.item
303− property: "moving"
280+ property: "objectName"
304− value: !stages.fullyShown
281+ value: "stage"
306 Binding {
283 Binding {
307 target: applicationsDisplayLoader.item
284 target: applicationsDisplayLoader.item
308− property: "shown"
285+ property: "dragAreaWidth"
309− value: stages.shown
286+ value: shell.edgeSize
311 Binding {
288 Binding {
312 target: applicationsDisplayLoader.item
289 target: applicationsDisplayLoader.item
313− property: "dragAreaWidth"
290+ property: "maximizedAppTopMargin"
314− value: shell.edgeSize
291+ // Not just using panel.panelHeight as that changes depending on the focused app.
292+ value: panel.indicators.panelHeight
295+ target: applicationsDisplayLoader.item
296+ property: "interactive"
297+ value: stages.roughlyFullyShown && !greeter.shown && !lockscreen.shown
298+ && panel.indicators.fullyClosed
301+ target: applicationsDisplayLoader.item
302+ property: "spreadEnabled"
303+ value: greeter.fakeActiveForApp === "" // to support emergency dialer hack
310+ objectName: "inputMethod"
311+ anchors { fill: parent; topMargin: panel.panelHeight }
312+ z: notifications.useModal || panel.indicators.shown ? overlay.z + 1 : overlay.z - 1
316+ target: SurfaceManager
318+ if (surface.type == MirSurfaceItem.InputMethod) {
319+ inputMethod.surface = surface;
323+ onSurfaceDestroyed: {
324+ if (inputMethod.surface == surface) {
325+ inputMethod.surface = null;
326+ surface.parent = null;
328+ if (!surface.parent) {
329+ // there's no one displaying it. delete it right away
@@ -328,7 +344,7 @@ FocusScope {
328 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
344 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
329 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
345 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
330 y: panel.panelHeight
346 y: panel.panelHeight
331− x: required ? 0 : - width
347+ visible: required
332 width: parent.width
348 width: parent.width
333 height: parent.height - panel.panelHeight
349 height: parent.height - panel.panelHeight
334 background: shell.background
350 background: shell.background
@@ -337,6 +353,13 @@ FocusScope {
338 onEntered: LightDM.Greeter.respond(passphrase);
354 onEntered: LightDM.Greeter.respond(passphrase);
339 onCancel: greeter.show()
355 onCancel: greeter.show()
357+ greeter.fakeActiveForApp = "dialer-app"
358+ shell.activateApplication("dialer-app")
362+ onShownChanged: if (shown) greeter.fakeActiveForApp = ""
341 Component.onCompleted: {
364 Component.onCompleted: {
342 if (LightDM.Users.count == 1) {
365 if (LightDM.Users.count == 1) {
@@ -348,6 +371,8 @@ FocusScope {
348 Connections {
371 Connections {
349 target: LightDM.Greeter
372 target: LightDM.Greeter
374+ onShowGreeter: greeter.show()
351 onShowPrompt: {
376 onShowPrompt: {
352 if (LightDM.Users.count == 1) {
377 if (LightDM.Users.count == 1) {
353 // TODO: There's no better way for now to determine if its a PIN or a passphrase.
378 // TODO: There's no better way for now to determine if its a PIN or a passphrase.
@@ -367,12 +392,19 @@ FocusScope {
368 if (LightDM.Greeter.authenticated) {
393 if (LightDM.Greeter.authenticated) {
369 lockscreen.hide();
394 lockscreen.hide();
371 lockscreen.clear(true);
397 lockscreen.clear(true);
403+ target: LightDM.Greeter
405+ value: greeter.shown || lockscreen.shown || greeter.fakeActiveForApp != ""
376 Rectangle {
408 Rectangle {
377 anchors.fill: parent
409 anchors.fill: parent
378 color: "black"
410 color: "black"
@@ -392,12 +424,18 @@ FocusScope {
392 StandardAnimation {}
424 StandardAnimation {}
427+ property bool fullyShown: showProgress === 1.0
395 readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
428 readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
429+ onShowProgressChanged: if (LightDM.Greeter.promptless && showProgress === 0) greeter.login()
397 Greeter {
431 Greeter {
398 id: greeter
432 id: greeter
399 objectName: "greeter"
433 objectName: "greeter"
435+ signal sessionStarted() // helpful for tests
437+ property string fakeActiveForApp: ""
401 available: true
439 available: true
402 hides: [launcher, panel.indicators]
440 hides: [launcher, panel.indicators]
403 shown: true
441 shown: true
@@ -409,14 +447,28 @@ FocusScope {
410 dragHandleWidth: shell.edgeSize
448 dragHandleWidth: shell.edgeSize
452+ LightDM.Greeter.startSessionSync();
412 onShownChanged: {
460 onShownChanged: {
413 if (shown) {
461 if (shown) {
414 lockscreen.reset();
462 lockscreen.reset();
463+ if (!LightDM.Greeter.promptless) {
415 // If there is only one user, we start authenticating with that one here.
466 // If there is only one user, we start authenticating with that one here.
416 // If there are more users, the Greeter will handle that
467 // If there are more users, the Greeter will handle that
417 if (LightDM.Users.count == 1) {
468 if (LightDM.Users.count == 1) {
418 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
469 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
471+ greeter.fakeActiveForApp = "";
420 greeter.forceActiveFocus();
472 greeter.forceActiveFocus();
@@ -439,12 +491,6 @@ FocusScope {
443− anchors.fill: parent
444− blockInput: ApplicationManager.focusedApplicationId.length === 0 || greeter.shown || lockscreen.shown || launcher.shown
445− || panel.indicators.shown
448 Connections {
494 Connections {
449 id: powerConnection
495 id: powerConnection
450 target: Powerd
496 target: Powerd
@@ -466,58 +512,69 @@ FocusScope {
468 function showHome() {
514 function showHome() {
515+ if (edgeDemo.running) {
519+ if (LightDM.Greeter.active) {
520+ if (!LightDM.Greeter.promptless) {
469− var animate = !greeter.shown && !stages.shown
526+ var animate = !LightDM.Greeter.active && !stages.shown
471 dash.setCurrentScope("clickscope", animate, false)
527 dash.setCurrentScope("clickscope", animate, false)
472 stages.hide()
528 stages.hide()
475− function hideIndicatorMenu(delay) {
531+ function showDash() {
476− panel.hideIndicatorMenu(delay);
532+ if (LightDM.Greeter.active && !LightDM.Greeter.promptless) {
536+ if (!stages.locked) {
540+ launcher.switchToNextState("visible");
543+ if (greeter.shown) {
544+ greeter.hideRight();
480 id: overlay
550 id: overlay
482 anchors.fill: parent
553 anchors.fill: parent
485 id: panel
556 id: panel
486 anchors.fill: parent //because this draws indicator menus
558 anchors.fill: parent //because this draws indicator menus
487− indicatorsMenuWidth: parent.width > units.gu(60) ? units.gu(40) : parent.width
488 indicators {
559 indicators {
489 hides: [launcher]
560 hides: [launcher]
490− available: edgeDemo.panelEnabled
561+ available: edgeDemo.panelEnabled && greeter.fakeActiveForApp === ""
491 contentEnabled: edgeDemo.panelContentEnabled
562 contentEnabled: edgeDemo.panelContentEnabled
563+ width: parent.width > units.gu(60) ? units.gu(40) : parent.width
564+ panelHeight: units.gu(3)
493− property string focusedAppId: ApplicationManager.focusedApplicationId
494− property var focusedApplication: ApplicationManager.findApplication(focusedAppId)
495− fullscreenMode: focusedApplication && stages.fullscreen && !greeter.shown && !lockscreen.shown
496− searchVisible: !greeter.shown && !lockscreen.shown && dash.shown && dash.searchable
498− InputFilterArea {
567+ property bool topmostApplicationIsFullscreen:
499− anchors {
568+ ApplicationManager.focusedApplicationId &&
500− top: parent.top
569+ ApplicationManager.findApplication(ApplicationManager.focusedApplicationId).fullscreen
504− height: (panel.fullscreenMode) ? shell.edgeSize : panel.panelHeight
509− InputFilterArea {
571+ fullscreenMode: (stages.roughlyFullyShown && topmostApplicationIsFullscreen
510− blockInput: launcher.shown
572+ && !LightDM.Greeter.active) || greeter.fakeActiveForApp !== ""
513− bottom: parent.bottom
516− width: launcher.width
519 Launcher {
575 Launcher {
520 id: launcher
576 id: launcher
577+ objectName: "launcher"
522 readonly property bool dashSwipe: progress > 0
579 readonly property bool dashSwipe: progress > 0
@@ -525,28 +582,15 @@ FocusScope {
525 anchors.bottom: parent.bottom
582 anchors.bottom: parent.bottom
526 width: parent.width
583 width: parent.width
527 dragAreaWidth: shell.edgeSize
584 dragAreaWidth: shell.edgeSize
528− available: edgeDemo.launcherEnabled
585+ available: edgeDemo.launcherEnabled && greeter.fakeActiveForApp === ""
530− onShowDashHome: {
587+ onShowDashHome: showHome()
531− if (edgeDemo.running)
536− onDash: {
588+ onDash: showDash()
537− if (stages.shown && !stages.overlayMode) {
538− if (!stages.locked) {
543− if (greeter.shown) {
544− greeter.hideRight();
548 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
589 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
549 onLauncherApplicationSelected: {
590 onLauncherApplicationSelected: {
591+ if (greeter.fakeActiveForApp !== "") {
550 if (!edgeDemo.running)
594 if (!edgeDemo.running)
551 shell.activateApplication(appId)
595 shell.activateApplication(appId)
@@ -568,11 +612,6 @@ FocusScope {
568 MouseArea {
612 MouseArea {
569 anchors.fill: parent
613 anchors.fill: parent
573− anchors.fill: parent
574− blockInput: modalNotificationBackground.visible
578 Notifications {
617 Notifications {
@@ -581,12 +620,10 @@ FocusScope {
581 model: NotificationBackend.Model
620 model: NotificationBackend.Model
582 margin: units.gu(1)
621 margin: units.gu(1)
584− anchors {
623+ y: panel.panelHeight
585− top: parent.top
624+ width: parent.width
587− bottom: parent.bottom
588− topMargin: panel.panelHeight
625+ height: parent.height - panel.panelHeight
590 states: [
627 states: [
592 name: "narrow"
629 name: "narrow"
@@ -600,62 +637,31 @@ FocusScope {
600 PropertyChanges { target: notifications; width: units.gu(38) }
637 PropertyChanges { target: notifications; width: units.gu(38) }
605− anchors { left: parent.left; right: parent.right }
606− height: parent.contentHeight
607− blockInput: height > 0
613− onFocusChanged: if (!focus) forceActiveFocus();
618− bottom: parent.bottom
621− width: shell.edgeSize
628− bottom: parent.bottom
631− width: shell.edgeSize
635 Binding {
643 Binding {
636 target: i18n
644 target: i18n
637 property: "domain"
645 property: "domain"
638 value: "unity8"
646 value: "unity8"
641− OSKController {
649+ Dialogs {
642− anchors.topMargin: panel.panelHeight
650+ id: dialogs
643− anchors.fill: parent // as needs to know the geometry of the shell
651+ anchors.fill: parent
644− }
652+ z: overlay.z + 10
645−
653+ onPowerOffClicked: {
646− //FIXME: This should be handled in the input stack, keyboard shouldnt propagate
654+ shutdownFadeOutRectangle.enabled = true;
647− MouseArea {
655+ shutdownFadeOutRectangle.visible = true;
648− anchors.bottom: parent.bottom
656+ shutdownFadeOut.start();
649− anchors.left: parent.left
657+ }
650− anchors.right: parent.right
651− height: ApplicationManager.keyboardVisible ? ApplicationManager.keyboardHeight : 0
653− enabled: ApplicationManager.keyboardVisible
661+ id: alphaDisclaimerLabel
657 anchors.centerIn: parent
662 anchors.centerIn: parent
658 visible: ApplicationManager.fake ? ApplicationManager.fake : false
663 visible: ApplicationManager.fake ? ApplicationManager.fake : false
659 text: "EARLY ALPHA\nNOT READY FOR USE"
665 text: "EARLY ALPHA\nNOT READY FOR USE"
660 color: "lightgrey"
666 color: "lightgrey"
661 opacity: 0.2
667 opacity: 0.2
@@ -669,6 +675,7 @@ FocusScope {
670 EdgeDemo {
676 EdgeDemo {
671 id: edgeDemo
677 id: edgeDemo
678+ z: alphaDisclaimerLabel.z + 10
672 greeter: greeter
679 greeter: greeter
673 launcher: launcher
680 launcher: launcher
674 dash: dash
681 dash: dash
@@ -680,4 +687,25 @@ FocusScope {
680 target: SessionBroadcast
687 target: SessionBroadcast
681 onShowHome: showHome()
688 onShowHome: showHome()
692+ id: shutdownFadeOutRectangle
697+ anchors.fill: parent
699+ NumberAnimation on opacity {
704+ if (shutdownFadeOutRectangle.enabled && shutdownFadeOutRectangle.visible) {
705+ DBusUnitySessionService.Shutdown();