feat: per-app full screen with idle sleep inhibition

This commit is contained in:
Blendman974 committed 2026-11-06 03:18:01 +01:00
1 parent be939f401b
commit 7ba73c7659
11 files changed
+162 -6

No files matched your search

+4 -2
View File
@@ -39,6 +39,7 @@ const menu = load('app/ui/menu.ts', {
function fixture(initial = '50', viewport = { x: 64, y: 124, width: 576, height: 260 }) {
let value = initial, writes = 0, closed = 0;
const settings = {
appFullscreenSetting: () => ({ get: () => false }),
brightnessSetting: { get: () => value, set: (next) => { value = next; writes++; } },
brightnessSettingToLevel: (value) => value === 'auto' ? null : Number(value),
};
@@ -120,13 +121,14 @@ test('system menu hides brightness in Auto and opens its picker between Voice in
shell.openSystemMenu('test');
let opened = shell.stack.layers.at(-1);
assert.deepEqual(Array.from(opened.items, (item) => item.label),
['Close current app', 'Focus app switcher', 'Voice input', 'Close all apps', 'Debug']);
['Close current app', 'Focus app switcher', 'Voice input', 'Close all apps', 'Enter full screen', 'Debug']);
shell.stack.clearToBase();
f.settings.brightnessSetting.set('40');
shell.openSystemMenu('test');
opened = shell.stack.layers.at(-1);
assert.deepEqual(Array.from(opened.items, (item) => item.label),
['Close current app', 'Focus app switcher', 'Voice input', 'Close all apps', 'Brightness', 'Debug']);
['Close current app', 'Focus app switcher', 'Voice input', 'Close all apps', 'Enter full screen', 'Brightness', 'Debug']);
await shell.stack.handleInput(gestures.makeInputEvent({ type: 'scroll-down' }));
await shell.stack.handleInput(gestures.makeInputEvent({ type: 'scroll-down' }));
await shell.stack.handleInput(gestures.makeInputEvent({ type: 'scroll-down' }));
await shell.stack.handleInput(gestures.makeInputEvent({ type: 'scroll-down' }));