From 2f6b7f82c4bbd0ed9e27b62cdb89f05301731f2c Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Wed, 22 Sep 2021 09:42:26 -0400 Subject: [PATCH] [MM-38577] Allow exit of full screen mode using the restore button on Windows (#1744) --- src/main/windows/windowManager.ts | 3 +++ src/renderer/components/MainPage.tsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/windows/windowManager.ts b/src/main/windows/windowManager.ts index e97df7ba..85a06ad5 100644 --- a/src/main/windows/windowManager.ts +++ b/src/main/windows/windowManager.ts @@ -466,6 +466,9 @@ export function restore() { if (focused) { focused.restore(); } + if (focused?.isFullScreen()) { + focused.setFullScreen(false); + } } export function reload() { diff --git a/src/renderer/components/MainPage.tsx b/src/renderer/components/MainPage.tsx index f5d10df0..e08b5559 100644 --- a/src/renderer/components/MainPage.tsx +++ b/src/renderer/components/MainPage.tsx @@ -346,7 +346,7 @@ export default class MainPage extends React.PureComponent { } let maxButton; - if (this.state.maximized) { + if (this.state.maximized || this.state.fullScreen) { maxButton = (