An open-source, self-hosted system for apps built with web technologies.
Release System 0.1.11
zohayrslilehf78421e5ab38
diff --git a/package.json b/package.jsonindex 81a1198..c842f93 100644--- a/package.json+++ b/package.json@@ -1,7 +1,7 @@{"name": "phreshos","displayName": "PhreshOS",- "version": "0.1.10",+ "version": "0.1.11","description": "The PhreshOS server, desktop, and authoritative system runtime.","type": "module","private": true,diff --git a/scripts/verify-client-surface.mjs b/scripts/verify-client-surface.mjsindex 473fec0..c4db2dd 100644--- a/scripts/verify-client-surface.mjs+++ b/scripts/verify-client-surface.mjs@@ -44,6 +44,14 @@ assert.deepEqual(first.state("bare").position, { x: 60, y: 70 })assert.deepEqual(second.state("ordinary").position, { x: 0, y: 0 })assert.deepEqual(ordinary.window.position, { x: 0, y: 0 })+// A reader reports the rectangle currently painted by the browser. Policy+// such as fill/restore still needs the underlying projection, because a+// relative full-surface value and its measured pixels are not equivalent.+first.represent("ordinary", () => ({ position: { x: 0, y: 0 }, size: { width: 1200, height: 800 } }))+assert.deepEqual(first.state("ordinary").size, { width: 1200, height: 800 })+assert.deepEqual(first.projection("ordinary").size, { width: 300, height: 200 })+first.represent("ordinary", null)+first.represent("bare", () => ({ position: { x: 65, y: 75 }, size: { width: 290, height: 190 } }))assert.deepEqual(first.state("bare").position, { x: 65, y: 75 })assert.deepEqual(first.state("bare").size, { width: 290, height: 190 })diff --git a/source/client/view/desktop/window-manager/local-windows.ts b/source/client/view/desktop/window-manager/local-windows.tsindex 2fed680..74fc886 100644--- a/source/client/view/desktop/window-manager/local-windows.ts+++ b/source/client/view/desktop/window-manager/local-windows.ts@@ -82,6 +82,12 @@ export default class LocalWindows implements LocalWindowHost {return windowState(state, frontmost(this.windows, state.layer) === identity, geometry)}+ /** Returns the values currently driving this desktop's representation. */+ public projection(process: string) {++ return this.existing(process).state+ }+public readonly represent = (process: string, reader: LocalGeometryReader | null) => {const identity = this.live.get(process)diff --git a/source/client/view/desktop/window-manager/window-manager.ts b/source/client/view/desktop/window-manager/window-manager.tsindex 07e38e7..5f91e23 100644--- a/source/client/view/desktop/window-manager/window-manager.ts+++ b/source/client/view/desktop/window-manager/window-manager.ts@@ -313,11 +313,13 @@ export default function useWindows() {if (!window || window.layer !== "window") return- const local = localWindow.state(process.identity)+ const shown = localWindow.state(process.identity)++ const projection = localWindow.projection(process.identity)const was = filled.current.get(process.identity)- const whole = wholeWindowGeometry(local.position, local.size)+ const whole = wholeWindowGeometry(projection.position, projection.size)if (whole && was) {@@ -328,7 +330,7 @@ export default function useWindows() {return}- filled.current.set(process.identity, { position: local.position, size: local.size })+ filled.current.set(process.identity, { position: shown.position, size: shown.size })snap(process, { x: "0/1", y: "0/1" }, { width: "1/1", height: "1/1" })