fix(electron): linux crash on exiting presentation mode (#6253)

This commit is contained in:
EYHN 2024-03-21 09:54:47 +00:00
parent 6a0ab54e25
commit d03c72a0a8
No known key found for this signature in database
GPG Key ID: 23F23D9E8B3971ED

View File

@ -127,10 +127,13 @@ async function createWindow(additionalArguments: string[]) {
});
browserWindow.on('leave-full-screen', () => {
// FIXME: workaround for theme bug in full screen mode
const size = browserWindow.getSize();
browserWindow.setSize(size[0] + 1, size[1] + 1);
browserWindow.setSize(size[0], size[1]);
// seems call this too soon may cause the app to crash
setTimeout(() => {
// FIXME: workaround for theme bug in full screen mode
const size = browserWindow.getSize();
browserWindow.setSize(size[0] + 1, size[1] + 1);
browserWindow.setSize(size[0], size[1]);
});
uiSubjects.onMaximized.next(false);
});