mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-11 09:11:50 +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:
parent
e56732431a
commit
1e19a5e40d
@ -29,6 +29,8 @@ export class IpcHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private setFullscreen(window: BrowserWindow, _event: IpcMainInvokeEvent, flag: boolean) {
|
private setFullscreen(window: BrowserWindow, _event: IpcMainInvokeEvent, flag: boolean) {
|
||||||
window.setFullScreen(flag);
|
if (window.isFullScreen() != flag) {
|
||||||
|
window.setFullScreen(flag);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user