Skip to content

Commit

Permalink
fix(electron): linux crash on exiting presentation mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pengx17 committed Mar 21, 2024
1 parent 18224a8 commit 65c3124
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/frontend/electron/src/main/main-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down

0 comments on commit 65c3124

Please sign in to comment.