From 1e19a5e40d66442ace86c48689b707f6d46f7565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D1=97=D0=BB=20=D0=93=D1=80=D0=B8?= =?UTF-8?q?=D0=B3=D0=BE=D1=80=27=D1=94=D0=B2?= Date: Sun, 6 Apr 2025 01:41:56 +0300 Subject: [PATCH] Check fullscreen state before modifying it Workaround for an Electron bug which causes menus to disappear when using BrowserWindow#setFullscreen(false). --- electron/src/ipc.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/electron/src/ipc.ts b/electron/src/ipc.ts index ffc7a6f8..8d23bd14 100644 --- a/electron/src/ipc.ts +++ b/electron/src/ipc.ts @@ -29,6 +29,8 @@ export class IpcHandler { } private setFullscreen(window: BrowserWindow, _event: IpcMainInvokeEvent, flag: boolean) { - window.setFullScreen(flag); + if (window.isFullScreen() != flag) { + window.setFullScreen(flag); + } } }