diff --git a/ui/dev/harness.html b/ui/dev/harness.html index 4497084..fdbdfef 100644 --- a/ui/dev/harness.html +++ b/ui/dev/harness.html @@ -51,9 +51,9 @@
-
ours — bare .title-bar, no wrapper
+
ours — app.html shell (active above, inactive below)
-
+
miniSCP
@@ -62,9 +62,18 @@
-
-

No frame, no shadow, no glass.

+

Focused window.

+
+
+
+
miniSCP
+
+ + + +
+

Unfocused — chrome desaturates.

diff --git a/ui/src/app/app.html b/ui/src/app/app.html index 020fbbc..f5da772 100644 --- a/ui/src/app/app.html +++ b/ui/src/app/app.html @@ -1,4 +1,7 @@ -
+ +
@if (!rpc.available) {
@@ -10,17 +13,22 @@
} @else { - + - -
- - -
+ +
+ - - +
+ + +
+ + + +
} diff --git a/ui/src/app/app.ts b/ui/src/app/app.ts index 9b78da0..62a237d 100644 --- a/ui/src/app/app.ts +++ b/ui/src/app/app.ts @@ -45,6 +45,11 @@ import { UpdaterService } from './updater.service'; host: { '(window:keydown)': 'onWindowKeydown($event)', '(window:contextmenu)': 'blockContextMenu($event)', + // Aero greys an inactive window's title bar and controls. The webview gets + // DOM focus/blur when the native window's focus changes, so this needs no + // RPC — see the `active` binding on .window in app.html. + '(window:focus)': 'windowFocused.set(true)', + '(window:blur)': 'windowFocused.set(false)', }, }) export class App { @@ -62,6 +67,9 @@ export class App { /** The connection-manager window is open — this window is modal-blocked. */ readonly managerOpen = signal(false); + /** Drives `.window.active`: Aero desaturates an unfocused window's chrome. */ + readonly windowFocused = signal(document.hasFocus()); + /** Shown in the win7 title bar (no native titlebar to carry it). */ readonly appName = BRANDING.appName;