@@ -98,17 +98,6 @@ FocusScope {
101− onCurrentFocusedAppIdChanged: {
102− // If any app is focused when greeter is open, it's due to a user action
103− // like a snap decision (say, an incoming call).
104− // TODO: this should be protected to only unlock for certain applications / certain usecases
105− // potentially only in connection with a notification.
106− if (greeter.shown && currentFocusedAppId) {
112 function activateApplication(desktopFile, argument) {
101 function activateApplication(desktopFile, argument) {
113 if (applicationManager) {
102 if (applicationManager) {
114 // For newly started applications, as it takes them time to draw their first frame
103 // For newly started applications, as it takes them time to draw their first frame
@@ -476,17 +465,17 @@ FocusScope {
477 function setFocused(focused) {
466 function setFocused(focused) {
478 if (!focused) {
467 if (!focused) {
479− previousMainApp = applicationManager.mainStageFocusedApplication;
468+ greeter.previousMainApp = applicationManager.mainStageFocusedApplication;
480− previousSideApp = applicationManager.sideStageFocusedApplication;
469+ greeter.previousSideApp = applicationManager.sideStageFocusedApplication;
481 applicationManager.unfocusCurrentApplication();
470 applicationManager.unfocusCurrentApplication();
483− if (previousMainApp) {
472+ if (greeter.previousMainApp) {
484− applicationManager.focusApplication(previousMainApp);
473+ applicationManager.focusApplication(greeter.previousMainApp);
485− previousMainApp = null;
474+ greeter.previousMainApp = null;
487− if (previousSideApp) {
476+ if (greeter.previousSideApp) {
488− applicationManager.focusApplication(previousSideApp);
477+ applicationManager.focusApplication(greeter.previousSideApp);
489− previousSideApp = null;
478+ greeter.previousSideApp = null;
@@ -520,6 +509,29 @@ FocusScope {
520 launcher.tease();
509 launcher.tease();
514+ target: applicationManager
515+ ignoreUnknownSignals: true
516+ // If any app is focused when greeter is open, it's due to a user action
517+ // like a snap decision (say, an incoming call).
518+ // TODO: these should be protected to only unlock for certain applications / certain usecases
519+ // potentially only in connection with a notification.
520+ onMainStageFocusedApplicationChanged: {
521+ if (greeter.shown && applicationManager.mainStageFocusedApplication) {
522+ greeter.previousMainApp = null // make way for new focused app
523+ greeter.previousSideApp = null
527+ onSideStageFocusedApplicationChanged: {
528+ if (greeter.shown && applicationManager.sideStageFocusedApplication) {
529+ greeter.previousMainApp = null // make way for new focused app
530+ greeter.previousSideApp = null
525 InputFilterArea {
537 InputFilterArea {
@@ -597,6 +609,12 @@ FocusScope {
597 shown: false
609 shown: false
598 showAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: 0; easing.type: Easing.Linear }
610 showAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: 0; easing.type: Easing.Linear }
599 hideAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: hudRevealer.closedValue; easing.type: Easing.Linear }
611 hideAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: hudRevealer.closedValue; easing.type: Easing.Linear }
614+ target: shell.applicationManager
615+ onMainStageFocusedApplicationChanged: hud.hide()
616+ onSideStageFocusedApplicationChanged: hud.hide()
602 Revealer {
620 Revealer {