INNER CODE UNIT · TypeScript
initialiseDesktopWindowChrome
openocta/openocta · ui/src/ui/app.ts:1269
private async initialiseDesktopWindowChrome() {
this.isDesktopShell = isDesktopShell();
if (!this.isDesktopShell) {
return;
}
try {
const platform = (await this.getDesktopRuntime()?.Environment?.())?.platform ?? "";
this.isWindowsDesktop = platform === "windows";
if (!this.isWindowsDesktop) {
this.isWindowMaximised = false;
return;
}
await this.refreshWindowMaximised();
if (!this.desktopWindowResizeHandler) {
this.desktopWindowResizeHandler = () => {
void this.refreshWindowMaximised();
};
window.addEventListener("resize", this.desktopWindowResizeHandler);