@@ -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
51 property bool locked: LightDM.Greeter.active && !LightDM.Greeter.promptless
52 property bool locked: LightDM.Greeter.active && !LightDM.Greeter.promptless
53 property bool sideStageEnabled: shell.width >= units.gu(100)
54 property bool sideStageEnabled: shell.width >= units.gu(100)
@@ -56,14 +57,10 @@ FocusScope {
56 function activateApplication(appId) {
57 function activateApplication(appId) {
57 if (ApplicationManager.findApplication(appId)) {
58 if (ApplicationManager.findApplication(appId)) {
58 ApplicationManager.requestFocusApplication(appId);
59 ApplicationManager.requestFocusApplication(appId);
60− if (stages.locked && ApplicationManager.focusedApplicationId == appId) {
61− applicationsDisplayLoader.item.select(appId);
64 var execFlags = shell.sideStageEnabled ? ApplicationManager.NoFlag : ApplicationManager.ForceMainStage;
61 var execFlags = shell.sideStageEnabled ? ApplicationManager.NoFlag : ApplicationManager.ForceMainStage;
65 ApplicationManager.startApplication(appId, execFlags);
62 ApplicationManager.startApplication(appId, execFlags);
66− stages.show(false);
63+ stages.show();
@@ -90,82 +87,74 @@ FocusScope {
90 id: volumeControl
87 id: volumeControl
91+ // Handle but do not filter out volume keys
93− Keys.onVolumeUpPressed: volumeControl.volumeUp()
92+ Keys.onVolumeUpPressed: { volumeControl.volumeUp(); event.accepted = false; }
94− Keys.onVolumeDownPressed: volumeControl.volumeDown()
93+ Keys.onVolumeDownPressed: { volumeControl.volumeDown(); event.accepted = false; }
96− Item {
95+ Keys.onPressed: {
97− id: underlayClipper
96+ if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
98− anchors.fill: parent
97+ dialogs.onPowerKeyPressed();
99− anchors.rightMargin: stages.overlayWidth
98+ event.accepted = true;
100− clip: stages.overlayMode && !stages.painting
99+ } else {
100+ event.accepted = false;
102− InputFilterArea {
104+ Keys.onReleased: {
103− anchors.fill: parent
105+ if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
104− blockInput: parent.clip
106+ dialogs.onPowerKeyReleased();
107+ event.accepted = true;
109+ event.accepted = false;
108− id: underlay
115+ id: underlay
109− objectName: "underlay"
116+ objectName: "underlay"
110− anchors.fill: parent
117+ anchors.fill: parent
111− anchors.rightMargin: -parent.anchors.rightMargin
113− // Whether the underlay is fully covered by opaque UI elements.
119+ // Whether the underlay is fully covered by opaque UI elements.
114− property bool fullyCovered: panel.indicators.fullyOpened && shell.width <= panel.indicators.width
120+ property bool fullyCovered: (panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth)
121+ || stages.fullyShown || greeterWrapper.fullyShown
122+ visible: !fullyCovered
116− // Whether the user should see the topmost application surface (if there's one at all).
124+ Image {
117− readonly property bool applicationSurfaceShouldBeSeen: stages.shown && !stages.painting && !stages.overlayMode
125+ anchors.fill: dash
126+ source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
127+ fillMode: Image.PreserveAspectCrop
128+ horizontalAlignment: Image.AlignRight
129+ verticalAlignment: Image.AlignTop
119− // NB! Application surfaces are stacked behind the shell one. So they can only be seen by the user
132+ Dash {
120− // through the translucent parts of the shell surface.
133+ id: dash
121− visible: !fullyCovered && !applicationSurfaceShouldBeSeen
134+ objectName: "dash"
123− Rectangle {
136+ available: !LightDM.Greeter.active
124− anchors.fill: parent
137+ hides: [stages, launcher, panel.indicators]
125− color: "black"
138+ shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0 &&
126− opacity: dash.disappearingAnimationProgress
139+ !(panel.indicators.fullyOpened && !sideStageEnabled)
127− }
140+ enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
129− Image {
142+ anchors {
130− anchors.fill: dash
143+ fill: parent
131− source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
144+ topMargin: panel.panelHeight
132− fillMode: Image.PreserveAspectCrop
133− horizontalAlignment: Image.AlignRight
134− verticalAlignment: Image.AlignTop
137− Dash {
147+ contentScale: 1.0 - 0.2 * disappearingAnimationProgress
138− id: dash
148+ opacity: 1.0 - disappearingAnimationProgress
139− objectName: "dash"
149+ property real disappearingAnimationProgress: stages.showProgress
141− available: !LightDM.Greeter.active
142− hides: [stages, launcher, panel.indicators]
143− shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0
144− enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
148− topMargin: panel.panelHeight
151− contentScale: 1.0 - 0.2 * disappearingAnimationProgress
152− opacity: 1.0 - disappearingAnimationProgress
153− property real disappearingAnimationProgress: {
154− if (stages.overlayMode) {
157− return stages.showProgress
161− // FIXME: only necessary because stages.showProgress is not animated
151+ // FIXME: only necessary because stages.showProgress is not animated
162− Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
152+ Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
167 EdgeDragArea {
156 EdgeDragArea {
168− id: stagesDragHandle
157+ id: stagesDragArea
169 direction: Direction.Leftwards
158 direction: Direction.Leftwards
171 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
160 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
@@ -175,20 +164,20 @@ FocusScope {
176 onTouchXChanged: {
165 onTouchXChanged: {
177 if (status == DirectionalDragArea.Recognized) {
166 if (status == DirectionalDragArea.Recognized) {
178− if (ApplicationManager.count == 0) {
167+ if (ApplicationManager.empty) {
179− progress = Math.max(stages.width - stagesDragHandle.width + touchX, stages.width * .3)
168+ progress = Math.max(stages.width - stagesDragArea.width + touchX, stages.width * .3);
181− progress = stages.width - stagesDragHandle.width + touchX
170+ progress = stages.width - stagesDragArea.width + touchX;
186 onDraggingChanged: {
175 onDraggingChanged: {
187 if (!dragging) {
176 if (!dragging) {
188− if (ApplicationManager.count > 0 && progress < stages.width - units.gu(10)) {
177+ if (!ApplicationManager.empty && progress < stages.width - units.gu(10)) {
189− stages.show(true)
178+ stages.show();
191− stagesDragHandle.progress = stages.width;
180+ stagesDragArea.progress = Qt.binding(function () { return stages.width; });
@@ -199,253 +188,93 @@ FocusScope {
199 width: parent.width
188 width: parent.width
200 height: parent.height
189 height: parent.height
191+ visible: !fullyHidden && !ApplicationManager.empty
203 if (shown) {
194 if (shown) {
204− if (overlayMode || locked || greeter.fakeActiveForApp !== "") {
195+ if (locked || greeter.fakeActiveForApp !== "") {
205 return 0;
196 return 0;
207− return launcher.progress
198+ return launcher.progress;
209− return stagesDragHandle.progress
200+ return stagesDragArea.progress
213 Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
203 Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
215 property bool shown: false
205 property bool shown: false
208+ if (ApplicationManager.count > 0) {
209+ ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
212+ if (ApplicationManager.focusedApplicationId) {
213+ ApplicationManager.updateScreenshot(ApplicationManager.focusedApplicationId);
214+ ApplicationManager.unfocusCurrentApplication();
219+ // Avoid a silent "divide by zero -> NaN" situation during init as shell.width will be
220+ // zero. That breaks the property binding and the function won't be reevaluated once
221+ // shell.width is set, with the NaN result staying there for good.
217− property real showProgress: overlayMode ? 0 : MathUtils.clamp(1 - x / shell.width, 0, 1)
222+ property real showProgress: shell.width ? MathUtils.clamp(1 - x / shell.width, 0, 1) : 0
219 property bool fullyShown: x == 0
224 property bool fullyShown: x == 0
220 property bool fullyHidden: x == width
225 property bool fullyHidden: x == width
222− property bool painting: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.painting : false
223− property bool fullscreen: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.fullscreen : false
224− property bool overlayMode: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.overlayMode : false
225− property int overlayWidth: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.overlayWidth : false
226 property bool locked: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.locked : false
227 property bool locked: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.locked : false
229+ // It might technically not be fullyShown but visually it just looks so.
230+ property bool roughlyFullyShown: x >= 0 && x <= units.gu(1)
228− function show(focusApp) {
232+ function show() {
229 shown = true;
233 shown = true;
230− panel.indicators.hide();
231− edgeDemo.stopDemo();
233− if (!ApplicationManager.focusedApplicationId && ApplicationManager.count > 0 && focusApp) {
234− ApplicationManager.focusApplication(ApplicationManager.get(0).appId);
238 function hide() {
236 function hide() {
239 shown = false;
237 shown = false;
240− if (ApplicationManager.focusedApplicationId) {
241− ApplicationManager.unfocusCurrentApplication();
245 Connections {
240 Connections {
246 target: ApplicationManager
241 target: ApplicationManager
248 onFocusRequested: {
242 onFocusRequested: {
249 if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== appId) {
243 if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== appId) {
250 lockscreen.show();
244 lockscreen.show();
252 greeter.hide();
246 greeter.hide();
253− stages.show(true);
247+ stages.show();
256 onFocusedApplicationIdChanged: {
250 onFocusedApplicationIdChanged: {
257 if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== ApplicationManager.focusedApplicationId) {
251 if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== ApplicationManager.focusedApplicationId) {
258 lockscreen.show();
252 lockscreen.show();
260− if (ApplicationManager.focusedApplicationId.length > 0) {
254+ panel.indicators.hide();
263− if (!stages.overlayMode) {
269 onApplicationAdded: {
257 onApplicationAdded: {
270− stages.show(false);
258+ if (greeter.shown) {
271− }
259+ greeter.hide();
273− onApplicationRemoved: {
274− if (ApplicationManager.focusedApplicationId.length == 0) {
280− property bool dialogShown: false
287− text: "Are you sure that you want to logout?"
291− PopupUtils.close(dialogueLogout);
292− stages.dialogShown = false;
298− DBusUnitySessionService.Logout();
299− PopupUtils.close(dialogueLogout);
300− stages.dialogShown = false;
309− id: dialogueShutdown
311− text: "Are you sure that you want to shutdown?"
315− PopupUtils.close(dialogueShutdown);
316− stages.dialogShown = false;
322− dBusUnitySessionServiceConnection.closeAllApps();
323− DBusUnitySessionService.Shutdown();
324− PopupUtils.close(dialogueShutdown);
325− stages.dialogShown = false;
336− text: "Are you sure that you want to reboot?"
340− PopupUtils.close(dialogueReboot)
341− stages.dialogShown = false;
347− dBusUnitySessionServiceConnection.closeAllApps();
348− DBusUnitySessionService.Reboot();
349− PopupUtils.close(dialogueReboot);
350− stages.dialogShown = false;
361− text: i18n.tr("Are you sure you would like to turn power off?")
363− text: i18n.tr("Power off")
365− dBusUnitySessionServiceConnection.closeAllApps();
366− PopupUtils.close(dialoguePower);
367− stages.dialogShown = false;
368− shutdownFadeOutRectangle.enabled = true;
369− shutdownFadeOutRectangle.visible = true;
370− shutdownFadeOut.start();
374− text: i18n.tr("Restart")
376− dBusUnitySessionServiceConnection.closeAllApps();
377− DBusUnitySessionService.Reboot();
378− PopupUtils.close(dialoguePower);
379− stages.dialogShown = false;
383− text: i18n.tr("Cancel")
385− PopupUtils.close(dialoguePower);
386− stages.dialogShown = false;
392− function showPowerDialog() {
393− if (!stages.dialogShown) {
394− stages.dialogShown = true;
395− PopupUtils.open(powerDialog);
400− id: dBusUnitySessionServiceConnection
401− objectName: "dBusUnitySessionServiceConnection"
402− target: DBusUnitySessionService
404− function closeAllApps() {
406− var app = ApplicationManager.get(0);
410− ApplicationManager.stopApplication(app.appId);
414− onLogoutRequested: {
415− // Display a dialog to ask the user to confirm.
416− if (!stages.dialogShown) {
261+ if (!stages.shown) {
417− stages.dialogShown = true;
262+ stages.show();
418− PopupUtils.open(logoutDialog);
422− onShutdownRequested: {
266+ onEmptyChanged: {
423− // Display a dialog to ask the user to confirm.
267+ if (ApplicationManager.empty) {
424− if (!stages.dialogShown) {
268+ stages.hide();
425− stages.dialogShown = true;
426− PopupUtils.open(shutdownDialog);
430− onRebootRequested: {
431− // Display a dialog to ask the user to confirm.
432− if (!stages.dialogShown) {
433− stages.dialogShown = true;
434− PopupUtils.open(rebootDialog);
445 id: applicationsDisplayLoader
274 id: applicationsDisplayLoader
446 anchors.fill: parent
275 anchors.fill: parent
448− source: shell.sideStageEnabled ? "Stages/StageWithSideStage.qml" : "Stages/PhoneStage.qml"
277+ source: shell.sideStageEnabled ? "Stages/TabletStage.qml" : "Stages/PhoneStage.qml"
450 Binding {
279 Binding {
451 target: applicationsDisplayLoader.item
280 target: applicationsDisplayLoader.item
@@ -454,18 +283,20 @@ FocusScope {
455 Binding {
284 Binding {
456 target: applicationsDisplayLoader.item
285 target: applicationsDisplayLoader.item
457− property: "moving"
286+ property: "dragAreaWidth"
458− value: !stages.fullyShown
287+ value: shell.edgeSize
460 Binding {
289 Binding {
461 target: applicationsDisplayLoader.item
290 target: applicationsDisplayLoader.item
462− property: "shown"
291+ property: "maximizedAppTopMargin"
463− value: stages.shown
292+ // Not just using panel.panelHeight as that changes depending on the focused app.
293+ value: panel.indicators.panelHeight
465 Binding {
295 Binding {
466 target: applicationsDisplayLoader.item
296 target: applicationsDisplayLoader.item
467− property: "dragAreaWidth"
297+ property: "interactive"
468− value: shell.edgeSize
298+ value: stages.roughlyFullyShown && !greeter.shown && !lockscreen.shown
299+ && panel.indicators.fullyClosed
470 Binding {
301 Binding {
471 target: applicationsDisplayLoader.item
302 target: applicationsDisplayLoader.item
@@ -475,6 +306,33 @@ FocusScope {
311+ objectName: "inputMethod"
312+ anchors { fill: parent; topMargin: panel.panelHeight }
313+ z: notifications.useModal || panel.indicators.shown ? overlay.z + 1 : overlay.z - 1
317+ target: SurfaceManager
319+ if (surface.type == MirSurfaceItem.InputMethod) {
320+ inputMethod.surface = surface;
324+ onSurfaceDestroyed: {
325+ if (inputMethod.surface == surface) {
326+ inputMethod.surface = null;
327+ surface.parent = null;
329+ if (!surface.parent) {
330+ // there's no one displaying it. delete it right away
478 Lockscreen {
336 Lockscreen {
479 id: lockscreen
337 id: lockscreen
480 objectName: "lockscreen"
338 objectName: "lockscreen"
@@ -487,7 +345,7 @@ FocusScope {
487 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
345 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
488 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
346 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
489 y: panel.panelHeight
347 y: panel.panelHeight
490− x: required ? 0 : - width
348+ visible: required
491 width: parent.width
349 width: parent.width
492 height: parent.height - panel.panelHeight
350 height: parent.height - panel.panelHeight
493 background: shell.background
351 background: shell.background
@@ -574,6 +432,7 @@ FocusScope {
574 StandardAnimation {}
432 StandardAnimation {}
435+ property bool fullyShown: showProgress === 1.0
577 readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
436 readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
578 onShowProgressChanged: if (LightDM.Greeter.promptless && showProgress === 0) greeter.login()
437 onShowProgressChanged: if (LightDM.Greeter.promptless && showProgress === 0) greeter.login()
@@ -640,12 +499,6 @@ FocusScope {
644− anchors.fill: parent
645− blockInput: ApplicationManager.focusedApplicationId.length === 0 || greeter.shown || lockscreen.shown || launcher.shown
646− || panel.indicators.shown
649 Connections {
502 Connections {
650 id: powerConnection
503 id: powerConnection
651 target: Powerd
504 target: Powerd
@@ -688,7 +541,7 @@ FocusScope {
691− if (stages.shown && !stages.overlayMode && !stages.locked) {
544+ if (!stages.locked) {
692 stages.hide();
545 stages.hide();
693 launcher.fadeOut();
546 launcher.fadeOut();
@@ -703,6 +556,7 @@ FocusScope {
705 id: overlay
558 id: overlay
707 anchors.fill: parent
561 anchors.fill: parent
@@ -717,29 +571,13 @@ FocusScope {
717 width: parent.width > units.gu(60) ? units.gu(40) : parent.width
571 width: parent.width > units.gu(60) ? units.gu(40) : parent.width
718 panelHeight: units.gu(3)
572 panelHeight: units.gu(3)
720− property string focusedAppId: ApplicationManager.focusedApplicationId
721− property var focusedApplication: ApplicationManager.findApplication(focusedAppId)
722− fullscreenMode: (focusedApplication && stages.fullscreen && !LightDM.Greeter.active) || greeter.fakeActiveForApp !== ""
724− InputFilterArea {
575+ property bool topmostApplicationIsFullscreen:
725− anchors {
576+ ApplicationManager.focusedApplicationId &&
726− top: parent.top
577+ ApplicationManager.findApplication(ApplicationManager.focusedApplicationId).fullscreen
730− height: (panel.fullscreenMode) ? shell.edgeSize : panel.panelHeight
735− InputFilterArea {
579+ fullscreenMode: (stages.roughlyFullyShown && topmostApplicationIsFullscreen
736− blockInput: launcher.shown
580+ && !LightDM.Greeter.active) || greeter.fakeActiveForApp !== ""
739− bottom: parent.bottom
742− width: launcher.width
745 Launcher {
583 Launcher {
@@ -782,11 +620,6 @@ FocusScope {
782 MouseArea {
620 MouseArea {
783 anchors.fill: parent
621 anchors.fill: parent
787− anchors.fill: parent
788− blockInput: modalNotificationBackground.visible
792 Notifications {
625 Notifications {
@@ -812,36 +645,7 @@ FocusScope {
812 PropertyChanges { target: notifications; width: units.gu(38) }
645 PropertyChanges { target: notifications; width: units.gu(38) }
817− anchors { left: parent.left; right: parent.right }
818− height: parent.contentHeight
819− blockInput: height > 0
825− onFocusChanged: if (!focus) forceActiveFocus();
830− bottom: parent.bottom
833− width: shell.edgeSize
840− bottom: parent.bottom
843− width: shell.edgeSize
847 Binding {
651 Binding {
@@ -850,24 +654,22 @@ FocusScope {
850 value: "unity8"
654 value: "unity8"
853− OSKController {
657+ Dialogs {
854− anchors.topMargin: panel.panelHeight
658+ id: dialogs
855− anchors.fill: parent // as needs to know the geometry of the shell
659+ anchors.fill: parent
856− }
660+ z: overlay.z + 10
857−
661+ onPowerOffClicked: {
858− //FIXME: This should be handled in the input stack, keyboard shouldnt propagate
662+ shutdownFadeOutRectangle.enabled = true;
859− MouseArea {
663+ shutdownFadeOutRectangle.visible = true;
860− anchors.bottom: parent.bottom
664+ shutdownFadeOut.start();
861− anchors.left: parent.left
665+ }
862− anchors.right: parent.right
863− height: ApplicationManager.keyboardVisible ? ApplicationManager.keyboardHeight : 0
865− enabled: ApplicationManager.keyboardVisible
669+ id: alphaDisclaimerLabel
869 anchors.centerIn: parent
670 anchors.centerIn: parent
870 visible: ApplicationManager.fake ? ApplicationManager.fake : false
671 visible: ApplicationManager.fake ? ApplicationManager.fake : false
871 text: "EARLY ALPHA\nNOT READY FOR USE"
673 text: "EARLY ALPHA\nNOT READY FOR USE"
872 color: "lightgrey"
674 color: "lightgrey"
873 opacity: 0.2
675 opacity: 0.2
@@ -881,6 +683,7 @@ FocusScope {
882 EdgeDemo {
684 EdgeDemo {
883 id: edgeDemo
685 id: edgeDemo
686+ z: alphaDisclaimerLabel.z + 10
884 greeter: greeter
687 greeter: greeter
885 launcher: launcher
688 launcher: launcher
886 dash: dash
689 dash: dash
@@ -893,35 +696,9 @@ FocusScope {
893 onShowHome: showHome()
696 onShowHome: showHome()
897− if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
898− if (!powerKeyTimer.running) {
899− powerKeyTimer.start();
901− event.accepted = true;
906− if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
907− powerKeyTimer.stop();
908− event.accepted = true;
916− triggeredOnStart: false
919− stages.showPowerDialog();
923 Rectangle {
699 Rectangle {
924 id: shutdownFadeOutRectangle
700 id: shutdownFadeOutRectangle
925 enabled: false
702 enabled: false
926 visible: false
703 visible: false
927 color: "black"
704 color: "black"
@@ -938,4 +715,5 @@ FocusScope {