@@ -19,9 +19,9 @@ import AccountsService 0.1
19import GSettings 1.0
19import GSettings 1.0
20import Unity.Application 0.1
20import Unity.Application 0.1
21import Ubuntu.Components 0.1
21import Ubuntu.Components 0.1
22−import Ubuntu.Components.Popups 0.1
23import Ubuntu.Gestures 0.1
22import Ubuntu.Gestures 0.1
24import Unity.Launcher 0.1
23import Unity.Launcher 0.1
25import LightDM 0.1 as LightDM
25import LightDM 0.1 as LightDM
26import Powerd 0.1
26import Powerd 0.1
27import SessionBroadcast 0.1
27import SessionBroadcast 0.1
@@ -31,10 +31,11 @@ import "Launcher"
31import "Panel"
31import "Panel"
32import "Components"
32import "Components"
33import "Notifications"
33import "Notifications"
34import Unity.Notifications 1.0 as NotificationBackend
35import Unity.Notifications 1.0 as NotificationBackend
35import Unity.Session 0.1
36import Unity.Session 0.1
40 // 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
@@ -47,7 +48,7 @@ FocusScope {
47 property url background
48 property url background
48 readonly property real panelHeight: panel.panelHeight
49 readonly property real panelHeight: panel.panelHeight
50− property bool dashShown: dash.shown
51+ property bool dashShown: dash.shown && dash.available && underlay.visible
52 property bool sideStageEnabled: shell.width >= units.gu(100)
53 property bool sideStageEnabled: shell.width >= units.gu(100)
53 readonly property string focusedApplicationId: ApplicationManager.focusedApplicationId
54 readonly property string focusedApplicationId: ApplicationManager.focusedApplicationId
@@ -55,14 +56,10 @@ FocusScope {
55 function activateApplication(appId) {
56 function activateApplication(appId) {
56 if (ApplicationManager.findApplication(appId)) {
57 if (ApplicationManager.findApplication(appId)) {
57 ApplicationManager.requestFocusApplication(appId);
58 ApplicationManager.requestFocusApplication(appId);
59− if (stages.locked && ApplicationManager.focusedApplicationId == appId) {
60− applicationsDisplayLoader.item.select(appId);
63 var execFlags = shell.sideStageEnabled ? ApplicationManager.NoFlag : ApplicationManager.ForceMainStage;
60 var execFlags = shell.sideStageEnabled ? ApplicationManager.NoFlag : ApplicationManager.ForceMainStage;
64 ApplicationManager.startApplication(appId, execFlags);
61 ApplicationManager.startApplication(appId, execFlags);
65− stages.show(false);
62+ stages.show();
@@ -89,82 +86,74 @@ FocusScope {
89 id: volumeControl
86 id: volumeControl
90+ // Handle but do not filter out volume keys
92− Keys.onVolumeUpPressed: volumeControl.volumeUp()
91+ Keys.onVolumeUpPressed: { volumeControl.volumeUp(); event.accepted = false; }
93− Keys.onVolumeDownPressed: volumeControl.volumeDown()
92+ Keys.onVolumeDownPressed: { volumeControl.volumeDown(); event.accepted = false; }
95− Item {
94+ Keys.onPressed: {
96− id: underlayClipper
95+ if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
97− anchors.fill: parent
96+ dialogs.onPowerKeyPressed();
98− anchors.rightMargin: stages.overlayWidth
97+ event.accepted = true;
99− clip: stages.overlayMode && !stages.painting
98+ } else {
99+ event.accepted = false;
101− InputFilterArea {
103+ Keys.onReleased: {
102− anchors.fill: parent
104+ if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
103− blockInput: parent.clip
105+ dialogs.onPowerKeyReleased();
106+ event.accepted = true;
108+ event.accepted = false;
107− id: underlay
114+ id: underlay
108− objectName: "underlay"
115+ objectName: "underlay"
109− anchors.fill: parent
116+ anchors.fill: parent
110− anchors.rightMargin: -parent.anchors.rightMargin
112− // Whether the underlay is fully covered by opaque UI elements.
118+ // Whether the underlay is fully covered by opaque UI elements.
113− property bool fullyCovered: panel.indicators.fullyOpened && shell.width <= panel.indicators.width
119+ property bool fullyCovered: (panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth)
120+ || stages.fullyShown || greeterWrapper.fullyShown
121+ visible: !fullyCovered
115− // Whether the user should see the topmost application surface (if there's one at all).
123+ Image {
116− readonly property bool applicationSurfaceShouldBeSeen: stages.shown && !stages.painting && !stages.overlayMode
124+ anchors.fill: dash
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
118− // NB! Application surfaces are stacked behind the shell one. So they can only be seen by the user
131+ Dash {
119− // through the translucent parts of the shell surface.
132+ id: dash
120− visible: !fullyCovered && !applicationSurfaceShouldBeSeen
133+ objectName: "dash"
122− Rectangle {
135+ available: !LightDM.Greeter.active
123− anchors.fill: parent
136+ hides: [stages, launcher, panel.indicators]
124− color: "black"
137+ shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0 &&
125− opacity: dash.disappearingAnimationProgress
138+ !(panel.indicators.fullyOpened && !sideStageEnabled)
126− }
139+ enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
128− Image {
141+ anchors {
129− anchors.fill: dash
142+ fill: parent
130− source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
143+ topMargin: panel.panelHeight
131− fillMode: Image.PreserveAspectCrop
132− horizontalAlignment: Image.AlignRight
133− verticalAlignment: Image.AlignTop
140− available: !LightDM.Greeter.active
141− hides: [stages, launcher, panel.indicators]
142− shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0
143− enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
147− topMargin: panel.panelHeight
150− contentScale: 1.0 - 0.2 * disappearingAnimationProgress
146+ contentScale: 1.0 - 0.2 * disappearingAnimationProgress
151− opacity: 1.0 - disappearingAnimationProgress
147+ opacity: 1.0 - disappearingAnimationProgress
152− property real disappearingAnimationProgress: {
148+ property real disappearingAnimationProgress: stages.showProgress
153− if (stages.overlayMode) {
156− return stages.showProgress
160− // FIXME: only necessary because stages.showProgress is not animated
150+ // FIXME: only necessary because stages.showProgress is not animated
161− Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
151+ Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
166 EdgeDragArea {
155 EdgeDragArea {
167− id: stagesDragHandle
156+ id: stagesDragArea
168 direction: Direction.Leftwards
157 direction: Direction.Leftwards
170 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
159 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
@@ -174,20 +163,20 @@ FocusScope {
175 onTouchXChanged: {
164 onTouchXChanged: {
176 if (status == DirectionalDragArea.Recognized) {
165 if (status == DirectionalDragArea.Recognized) {
177− if (ApplicationManager.count == 0) {
166+ if (ApplicationManager.empty) {
178− progress = Math.max(stages.width - stagesDragHandle.width + touchX, stages.width * .3)
167+ progress = Math.max(stages.width - stagesDragArea.width + touchX, stages.width * .3);
180− progress = stages.width - stagesDragHandle.width + touchX
169+ progress = stages.width - stagesDragArea.width + touchX;
185 onDraggingChanged: {
174 onDraggingChanged: {
186 if (!dragging) {
175 if (!dragging) {
187− if (ApplicationManager.count > 0 && progress < stages.width - units.gu(10)) {
176+ if (!ApplicationManager.empty && progress < stages.width - units.gu(10)) {
188− stages.show(true)
177+ stages.show();
190− stagesDragHandle.progress = stages.width;
179+ stagesDragArea.progress = Qt.binding(function () { return stages.width; });
@@ -198,253 +187,93 @@ FocusScope {
198 width: parent.width
187 width: parent.width
199 height: parent.height
188 height: parent.height
190+ visible: !fullyHidden && !ApplicationManager.empty
202 if (shown) {
193 if (shown) {
203− if (overlayMode || locked || greeter.fakeActiveForApp !== "") {
194+ if (locked || greeter.fakeActiveForApp !== "") {
204 return 0;
195 return 0;
206− return launcher.progress
197+ return launcher.progress;
208− return stagesDragHandle.progress
199+ return stagesDragArea.progress
212 Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
202 Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
214 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.
216− 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
218 property bool fullyShown: x == 0
223 property bool fullyShown: x == 0
219 property bool fullyHidden: x == width
224 property bool fullyHidden: x == width
221− property bool painting: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.painting : false
222− property bool fullscreen: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.fullscreen : false
223− property bool overlayMode: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.overlayMode : false
224− property int overlayWidth: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.overlayWidth : false
225 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)
227− function show(focusApp) {
231+ function show() {
228 shown = true;
232 shown = true;
229− panel.indicators.hide();
230− edgeDemo.stopDemo();
232− if (!ApplicationManager.focusedApplicationId && ApplicationManager.count > 0 && focusApp) {
233− ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
237 function hide() {
235 function hide() {
238 shown = false;
236 shown = false;
239− if (ApplicationManager.focusedApplicationId) {
240− ApplicationManager.unfocusCurrentApplication();
244 Connections {
239 Connections {
245 target: ApplicationManager
240 target: ApplicationManager
247 onFocusRequested: {
241 onFocusRequested: {
248 if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== appId) {
242 if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== appId) {
249 lockscreen.show();
243 lockscreen.show();
251 greeter.hide();
245 greeter.hide();
252− stages.show(true);
246+ stages.show();
255 onFocusedApplicationIdChanged: {
249 onFocusedApplicationIdChanged: {
256 if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== ApplicationManager.focusedApplicationId) {
250 if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== ApplicationManager.focusedApplicationId) {
257 lockscreen.show();
251 lockscreen.show();
259− if (ApplicationManager.focusedApplicationId.length > 0) {
253+ panel.indicators.hide();
262− if (!stages.overlayMode) {
268 onApplicationAdded: {
256 onApplicationAdded: {
269− stages.show(false);
257+ if (greeter.shown) {
270− }
258+ greeter.hide();
272− onApplicationRemoved: {
273− if (ApplicationManager.focusedApplicationId.length == 0) {
279− property bool dialogShown: false
286− text: "Are you sure that you want to logout?"
290− PopupUtils.close(dialogueLogout);
291− stages.dialogShown = false;
297− DBusUnitySessionService.Logout();
298− PopupUtils.close(dialogueLogout);
299− stages.dialogShown = false;
308− id: dialogueShutdown
310− text: "Are you sure that you want to shutdown?"
314− PopupUtils.close(dialogueShutdown);
315− stages.dialogShown = false;
321− dBusUnitySessionServiceConnection.closeAllApps();
322− DBusUnitySessionService.Shutdown();
323− PopupUtils.close(dialogueShutdown);
324− stages.dialogShown = false;
335− text: "Are you sure that you want to reboot?"
339− PopupUtils.close(dialogueReboot)
340− stages.dialogShown = false;
346− dBusUnitySessionServiceConnection.closeAllApps();
347− DBusUnitySessionService.Reboot();
348− PopupUtils.close(dialogueReboot);
349− stages.dialogShown = false;
360− text: i18n.tr("Are you sure you would like to turn power off?")
362− text: i18n.tr("Power off")
364− dBusUnitySessionServiceConnection.closeAllApps();
365− PopupUtils.close(dialoguePower);
366− stages.dialogShown = false;
367− shutdownFadeOutRectangle.enabled = true;
368− shutdownFadeOutRectangle.visible = true;
369− shutdownFadeOut.start();
373− text: i18n.tr("Restart")
375− dBusUnitySessionServiceConnection.closeAllApps();
376− DBusUnitySessionService.Reboot();
377− PopupUtils.close(dialoguePower);
378− stages.dialogShown = false;
382− text: i18n.tr("Cancel")
384− PopupUtils.close(dialoguePower);
385− stages.dialogShown = false;
391− function showPowerDialog() {
392− if (!stages.dialogShown) {
393− stages.dialogShown = true;
394− PopupUtils.open(powerDialog);
399− id: dBusUnitySessionServiceConnection
400− objectName: "dBusUnitySessionServiceConnection"
401− target: DBusUnitySessionService
403− function closeAllApps() {
405− var app = ApplicationManager.get(0);
409− ApplicationManager.stopApplication(app.appId);
413− onLogoutRequested: {
414− // Display a dialog to ask the user to confirm.
415− if (!stages.dialogShown) {
416− stages.dialogShown = true;
417− PopupUtils.open(logoutDialog);
421− onShutdownRequested: {
422− // Display a dialog to ask the user to confirm.
423− if (!stages.dialogShown) {
260+ if (!stages.shown) {
424− stages.dialogShown = true;
261+ stages.show();
425− PopupUtils.open(shutdownDialog);
429− onRebootRequested: {
265+ onEmptyChanged: {
430− // Display a dialog to ask the user to confirm.
266+ if (ApplicationManager.empty) {
431− if (!stages.dialogShown) {
267+ stages.hide();
432− stages.dialogShown = true;
433− PopupUtils.open(rebootDialog);
444 id: applicationsDisplayLoader
273 id: applicationsDisplayLoader
445 anchors.fill: parent
274 anchors.fill: parent
447− source: shell.sideStageEnabled ? "Stages/StageWithSideStage.qml" : "Stages/PhoneStage.qml"
276+ source: shell.sideStageEnabled ? "Stages/TabletStage.qml" : "Stages/PhoneStage.qml"
449 Binding {
278 Binding {
450 target: applicationsDisplayLoader.item
279 target: applicationsDisplayLoader.item
@@ -453,18 +282,20 @@ FocusScope {
454 Binding {
283 Binding {
455 target: applicationsDisplayLoader.item
284 target: applicationsDisplayLoader.item
456− property: "moving"
285+ property: "dragAreaWidth"
457− value: !stages.fullyShown
286+ value: shell.edgeSize
459 Binding {
288 Binding {
460 target: applicationsDisplayLoader.item
289 target: applicationsDisplayLoader.item
461− property: "shown"
290+ property: "maximizedAppTopMargin"
462− value: stages.shown
291+ // Not just using panel.panelHeight as that changes depending on the focused app.
292+ value: panel.indicators.panelHeight
464 Binding {
294 Binding {
465 target: applicationsDisplayLoader.item
295 target: applicationsDisplayLoader.item
466− property: "dragAreaWidth"
296+ property: "interactive"
467− value: shell.edgeSize
297+ value: stages.roughlyFullyShown && !greeter.shown && !lockscreen.shown
298+ && panel.indicators.fullyClosed
469 Binding {
300 Binding {
470 target: applicationsDisplayLoader.item
301 target: applicationsDisplayLoader.item
@@ -474,6 +305,33 @@ FocusScope {
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
477 Lockscreen {
335 Lockscreen {
478 id: lockscreen
336 id: lockscreen
479 objectName: "lockscreen"
337 objectName: "lockscreen"
@@ -486,10 +344,11 @@ FocusScope {
486 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
344 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
487 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
345 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
488 y: panel.panelHeight
346 y: panel.panelHeight
489− x: required ? 0 : - width
347+ visible: required
490 width: parent.width
348 width: parent.width
491 height: parent.height - panel.panelHeight
349 height: parent.height - panel.panelHeight
492 background: shell.background
350 background: shell.background
351+ alphaNumeric: AccountsService.passwordDisplayHint === AccountsService.Keyboard
493 minPinLength: 4
352 minPinLength: 4
494 maxPinLength: 4
353 maxPinLength: 4
@@ -504,7 +363,7 @@ FocusScope {
504 onShownChanged: if (shown) greeter.fakeActiveForApp = ""
363 onShownChanged: if (shown) greeter.fakeActiveForApp = ""
506 Component.onCompleted: {
365 Component.onCompleted: {
507− if (LightDM.Users.count == 1) {
366+ if (greeter.narrowMode) {
508 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
367 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
@@ -516,14 +375,17 @@ FocusScope {
516 onShowGreeter: greeter.show()
375 onShowGreeter: greeter.show()
518 onShowPrompt: {
377 onShowPrompt: {
519− if (LightDM.Users.count == 1) {
378+ if (greeter.narrowMode) {
520− // TODO: There's no better way for now to determine if its a PIN or a passphrase.
521− if (text == "PIN") {
522− lockscreen.alphaNumeric = false
524− lockscreen.alphaNumeric = true
526− lockscreen.placeholderText = i18n.tr("Please enter %1").arg(text);
379+ lockscreen.placeholderText = i18n.tr("Please enter %1").arg(text.toLowerCase());
384+ onPromptlessChanged: {
385+ if (LightDM.Greeter.promptless) {
527 lockscreen.show();
389 lockscreen.show();
@@ -537,6 +399,9 @@ FocusScope {
537 greeter.login();
399 greeter.login();
539 lockscreen.clear(true);
401 lockscreen.clear(true);
402+ if (greeter.narrowMode) {
403+ LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
@@ -566,6 +431,7 @@ FocusScope {
566 StandardAnimation {}
431 StandardAnimation {}
434+ property bool fullyShown: showProgress === 1.0
569 readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
435 readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
570 onShowProgressChanged: if (LightDM.Greeter.promptless && showProgress === 0) greeter.login()
436 onShowProgressChanged: if (LightDM.Greeter.promptless && showProgress === 0) greeter.login()
@@ -590,25 +456,24 @@ FocusScope {
591 function login() {
457 function login() {
592 enabled = false;
458 enabled = false;
593− LightDM.Greeter.startSessionSync();
459+ if (LightDM.Greeter.startSessionSync()) {
594− sessionStarted();
460+ sessionStarted();
595− greeter.hide();
461+ greeter.hide();
596− lockscreen.hide();
462+ lockscreen.hide();
597− launcher.hide();
463+ launcher.hide();
598 enabled = true;
465 enabled = true;
601 onShownChanged: {
468 onShownChanged: {
602 if (shown) {
469 if (shown) {
603− lockscreen.reset();
470+ if (greeter.narrowMode) {
604− if (!LightDM.Greeter.promptless) {
607− // If there is only one user, we start authenticating with that one here.
608− // If there are more users, the Greeter will handle that
609− if (LightDM.Users.count == 1) {
610 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
471 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
473+ if (!LightDM.Greeter.promptless) {
612 greeter.fakeActiveForApp = "";
477 greeter.fakeActiveForApp = "";
613 greeter.forceActiveFocus();
478 greeter.forceActiveFocus();
@@ -632,12 +497,6 @@ FocusScope {
636− anchors.fill: parent
637− blockInput: ApplicationManager.focusedApplicationId.length === 0 || greeter.shown || lockscreen.shown || launcher.shown
638− || panel.indicators.shown
641 Connections {
500 Connections {
642 id: powerConnection
501 id: powerConnection
643 target: Powerd
502 target: Powerd
@@ -680,7 +539,7 @@ FocusScope {
683− if (stages.shown && !stages.overlayMode && !stages.locked) {
542+ if (!stages.locked) {
684 stages.hide();
543 stages.hide();
685 launcher.fadeOut();
544 launcher.fadeOut();
@@ -695,6 +554,7 @@ FocusScope {
697 id: overlay
556 id: overlay
699 anchors.fill: parent
559 anchors.fill: parent
@@ -709,29 +569,13 @@ FocusScope {
709 width: parent.width > units.gu(60) ? units.gu(40) : parent.width
569 width: parent.width > units.gu(60) ? units.gu(40) : parent.width
710 panelHeight: units.gu(3)
570 panelHeight: units.gu(3)
712− property string focusedAppId: ApplicationManager.focusedApplicationId
713− property var focusedApplication: ApplicationManager.findApplication(focusedAppId)
714− fullscreenMode: (focusedApplication && stages.fullscreen && !LightDM.Greeter.active) || greeter.fakeActiveForApp !== ""
716− InputFilterArea {
573+ property bool topmostApplicationIsFullscreen:
717− anchors {
574+ ApplicationManager.focusedApplicationId &&
718− top: parent.top
575+ ApplicationManager.findApplication(ApplicationManager.focusedApplicationId).fullscreen
722− height: (panel.fullscreenMode) ? shell.edgeSize : panel.panelHeight
727− InputFilterArea {
577+ fullscreenMode: (stages.roughlyFullyShown && topmostApplicationIsFullscreen
728− blockInput: launcher.shown
578+ && !LightDM.Greeter.active) || greeter.fakeActiveForApp !== ""
731− bottom: parent.bottom
734− width: launcher.width
737 Launcher {
581 Launcher {
@@ -774,11 +618,6 @@ FocusScope {
774 MouseArea {
618 MouseArea {
775 anchors.fill: parent
619 anchors.fill: parent
779− anchors.fill: parent
780− blockInput: modalNotificationBackground.visible
784 Notifications {
623 Notifications {
@@ -804,36 +643,7 @@ FocusScope {
804 PropertyChanges { target: notifications; width: units.gu(38) }
643 PropertyChanges { target: notifications; width: units.gu(38) }
809− anchors { left: parent.left; right: parent.right }
810− height: parent.contentHeight
811− blockInput: height > 0
817− onFocusChanged: if (!focus) forceActiveFocus();
822− bottom: parent.bottom
825− width: shell.edgeSize
832− bottom: parent.bottom
835− width: shell.edgeSize
839 Binding {
649 Binding {
@@ -842,24 +652,22 @@ FocusScope {
842 value: "unity8"
652 value: "unity8"
845− OSKController {
655+ Dialogs {
846− anchors.topMargin: panel.panelHeight
656+ id: dialogs
847− anchors.fill: parent // as needs to know the geometry of the shell
657+ anchors.fill: parent
848− }
658+ z: overlay.z + 10
849−
659+ onPowerOffClicked: {
850− //FIXME: This should be handled in the input stack, keyboard shouldnt propagate
660+ shutdownFadeOutRectangle.enabled = true;
851− MouseArea {
661+ shutdownFadeOutRectangle.visible = true;
852− anchors.bottom: parent.bottom
662+ shutdownFadeOut.start();
853− anchors.left: parent.left
663+ }
854− anchors.right: parent.right
855− height: ApplicationManager.keyboardVisible ? ApplicationManager.keyboardHeight : 0
857− enabled: ApplicationManager.keyboardVisible
667+ id: alphaDisclaimerLabel
861 anchors.centerIn: parent
668 anchors.centerIn: parent
862 visible: ApplicationManager.fake ? ApplicationManager.fake : false
669 visible: ApplicationManager.fake ? ApplicationManager.fake : false
863 text: "EARLY ALPHA\nNOT READY FOR USE"
671 text: "EARLY ALPHA\nNOT READY FOR USE"
864 color: "lightgrey"
672 color: "lightgrey"
865 opacity: 0.2
673 opacity: 0.2
@@ -873,6 +681,7 @@ FocusScope {
874 EdgeDemo {
682 EdgeDemo {
875 id: edgeDemo
683 id: edgeDemo
684+ z: alphaDisclaimerLabel.z + 10
876 greeter: greeter
685 greeter: greeter
877 launcher: launcher
686 launcher: launcher
878 dash: dash
687 dash: dash
@@ -885,35 +694,9 @@ FocusScope {
885 onShowHome: showHome()
694 onShowHome: showHome()
889− if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
890− if (!powerKeyTimer.running) {
891− powerKeyTimer.start();
893− event.accepted = true;
898− if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
899− powerKeyTimer.stop();
900− event.accepted = true;
908− triggeredOnStart: false
911− stages.showPowerDialog();
915 Rectangle {
697 Rectangle {
916 id: shutdownFadeOutRectangle
698 id: shutdownFadeOutRectangle
917 enabled: false
700 enabled: false
918 visible: false
701 visible: false
919 color: "black"
702 color: "black"
@@ -930,4 +713,5 @@ FocusScope {