Skip to content

Commit

Permalink
fix: windows full screen mode issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sekwah41 committed Dec 20, 2022
1 parent 75bad20 commit 55344a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/main/src/lifecycleEventHandlers/fullScreenBreak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ const setFullScreen = (
win: BrowserWindow | null,
isFullscreen: FullscreenState["isFullscreen"]
) => {
if (flag) {
win?.setResizable(true);
}
win?.setFullScreenable(true);
win?.setAlwaysOnTop(alwaysOnTop, "screen-saver");
win?.setFullScreen(flag);
Expand Down
4 changes: 4 additions & 0 deletions app/main/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ function createMainWindow() {
win.on("leave-full-screen", () => {
if (windowState.isOnCompactMode) {
setSizeIfDiff(340, 100);
// Windows doesn't like trying to set it as not resizeable it along with everything else that's going on
setTimeout(() => {
win?.setResizable(false);
});
} else {
setSizeIfDiff(340, getFrameHeight());
}
Expand Down

0 comments on commit 55344a2

Please sign in to comment.