Shell: double-tap wake returns to the last app

A double tap that wakes the display (a screen-off double-click, or the
firmware's display-wake) now focuses the foreground window instead of the app
switcher. "Wake into last app" (Display settings, on by default) turns it back
to the switcher. Lock screen, put-on, notification and wakeword wakes are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
FilipAlexanderandClaude Opus 5.5 committed 2026-10-17 16:42:41 +02:00
1 parent 2bb7b3ea1a
commit fee9dfac77
4 files changed
+19 -3

No files matched your search

+1 -1
View File
@@ -2306,7 +2306,7 @@ class DashboardController {
let shellPreWoke = false;
if (wakewordShouldWake || displayShouldWake) {
if (!shell.isScreenOn()) {
shellPreWoke = shell.wake("sidebar");
shellPreWoke = shell.wake(displayShouldWake ? shell.userWakeFocus() : "sidebar");
}
if (shellPreWoke || this.evenHubSessionSuspended || this.evenHubResumePromise) {
const ready = await frameTimings.spanAsync(frameId, "wake-barrier", () =>
+8
View File
@@ -570,6 +570,14 @@ export function getBrightnessPreferences() {
curve: autoBrightnessCurveSetting.getValidValue(), fadeMs: scaleAnimationDuration(SCREEN_FADE_MS, screenFadeSetting.get()) };
}
export const wakeToLastAppSetting = new ConfigSettingBoolean({
id: "wake-to-last-app",
label: "Wake into last app",
storageKey: "display.wakeToLastApp",
defaultValue: true,
description: "Waking the display with a double tap returns to the app you were using. Off: wake into the app switcher.",
});
export const screenTimeoutSetting = new ConfigSettingEnum<ScreenTimeoutSetting>({
id: "screen-timeout",
label: "Screen timeout",
+2
View File
@@ -75,6 +75,7 @@ import {
useMicControlSetting,
voiceProviderSetting,
screenTimeoutSetting,
wakeToLastAppSetting,
wakeWordActionSetting,
watchCanUnlockSetting,
watchCrownClockwiseNextSetting,
@@ -106,6 +107,7 @@ function settingsSections(): SettingsSection[] {
},
}),
toggleSettingMenuItem(lockScreenEnabledSetting),
toggleSettingMenuItem(wakeToLastAppSetting),
// A band (at one of five heights) / Tall / Full Screen; the
// dashboard controller moves or reflows windows on change.
enumSettingMenuItem(displayLayoutSetting),
+8 -2
View File
@@ -45,6 +45,7 @@ import {
statusBarVisibilitySetting,
timeFormatSetting,
wakeWordActionSetting,
wakeToLastAppSetting,
windowBorderSetting,
} from "../dashboard-settings";
import { onAmbientCardsChanged } from "./ambient-cards";
@@ -966,7 +967,7 @@ class Shell {
// "wake". Keep that directionality if delivery is delayed or duplicated.
if (event.type === "display-wake") {
this.lastInputAtMs = Date.now();
const wokeScreen = !this.screenOn && this.wake("sidebar");
const wokeScreen = !this.screenOn && this.wake(this.userWakeFocus());
return { shell: wokeScreen, window: false };
}
@@ -1005,7 +1006,7 @@ class Shell {
if (!this.screenOn) {
if (event.type === "double-click") {
this.wake("sidebar");
this.wake(this.userWakeFocus());
return { shell: true, window: false };
}
return { shell: false, window: false };
@@ -1108,6 +1109,11 @@ class Shell {
return { shell: false, window: false };
}
/** Where a user's double-tap wake lands: the last app, or the switcher (setting). */
userWakeFocus(): FocusKind {
return wakeToLastAppSetting.get() && this.foregroundWindow() ? "window" : "sidebar";
}
foregroundWindow(): ShellWindow | undefined {
return this.windows[this.selectedIndex] ?? this.windows[0];
}