1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-09 16:21:51 +00:00

Check fullscreen state before modifying it

Workaround for an Electron bug which causes menus to disappear when
using BrowserWindow#setFullscreen(false).
This commit is contained in:
Даниїл Григор'єв 2025-04-06 01:41:56 +03:00
parent e56732431a
commit 1e19a5e40d
No known key found for this signature in database
GPG Key ID: B890DF16341D8C1D

View File

@ -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);
}
}
}