fix(ui): gate custom window controls on the full bridge surface

Include getWindowState and onWindowStateChange in the
usesCustomWindowControls capability check — the controls rely on both
for initial state and for keeping the maximize/restore glyph in sync
with OS-triggered changes, so a partial bridge should not mount them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5 committed 2026-06-10 22:12:53 +02:00
1 parent 315d11cc6a
commit 21bd0980a6
1 file changed
+7 -3
@@ -54,9 +54,13 @@ export class RuntimeCapabilitiesService {
get usesCustomWindowControls(): boolean {
return (
(this.isWindows || this.isLinux) &&
['minimizeWindow', 'toggleMaximizeWindow', 'closeWindow'].every(
(methodName) => this.hasElectronMethod(methodName)
)
[
'minimizeWindow',
'toggleMaximizeWindow',
'closeWindow',
'getWindowState',
'onWindowStateChange',
].every((methodName) => this.hasElectronMethod(methodName))
);
}