Add Glanceboard depth setting

This commit is contained in:
James Babcock committed 2026-09-24 02:26:20 -07:00
1 parent 71c1971992
commit 915f155819
29 files changed
+262 -50

No files matched your search

+5
View File
@@ -14,6 +14,7 @@ export type DisplayTarget = Pick<
| "configureSurface"
| "removeSurface"
| "setSurfaceVisible"
| "setSurfaceDepth"
| "setUnderlayDim"
| "setScreenBlanked"
| "submitSurfaceFrame"
@@ -80,6 +81,10 @@ export class PreviewDisplayTarget implements DisplayTarget {
this.composited();
}
async setSurfaceDepth(id: string, depth: number): Promise<void> {
this.compositor.setSurfaceDepth(id, Math.round(depth));
}
async setUnderlayDim(belowZOrder: number, factor: number): Promise<void> {
this.compositor.setUnderlayDim(Math.round(belowZOrder), Math.max(0, Math.min(1, factor)));
this.composited();