From 0ae6c977aa485bf63c19549dce6ffaa53d854ff9 Mon Sep 17 00:00:00 2001 From: Peng Xiao Date: Sat, 19 Aug 2023 00:26:21 +0800 Subject: [PATCH] fix: workaround for fullscreen mode (#3829) --- apps/electron/src/main/main-window.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/electron/src/main/main-window.ts b/apps/electron/src/main/main-window.ts index 8a829cc680..bc58aa4f79 100644 --- a/apps/electron/src/main/main-window.ts +++ b/apps/electron/src/main/main-window.ts @@ -98,6 +98,13 @@ async function createWindow() { // TODO: gracefully close the app, for example, ask user to save unsaved changes }); + 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]); + }); + /** * URL for main window. */