Allow backgrounding EvenHub apps

This commit is contained in:
James Babcock committed 2026-08-16 20:59:42 -07:00
1 parent cde29cc4d0
commit b9f48c8e16
10 files changed
+376 -252

No files matched your search

+13 -1
View File
@@ -101,7 +101,19 @@ export function createInProcessWindow(options: InProcessWindowOptions): InProces
// items act on the shell directly (workers post messages instead).
const openWindowMenu = () => {
if (stack.topMatches((layer) => layer instanceof WindowMenuLayer)) return;
const items: MenuItem[] = [...(options.menuItems?.() ?? [])];
// "Focus app switcher" first: long-press then tap defocuses the app
// (hands focus to the sidebar) without closing it — the reliable way out
// for apps that consume double-click.
const items: MenuItem[] = [
{
label: "Focus app switcher",
onSelect: (ctx) => {
ctx.stack.pop();
shell.yieldFocusToSidebar();
},
},
...(options.menuItems?.() ?? []),
];
items.push({
label: "Voice input",
onSelect: (ctx) => {