From 09af7eeece0f31ab8d328cf62a3a6d51934cad9f Mon Sep 17 00:00:00 2001 From: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com> Date: Fri, 7 Jan 2022 09:30:47 -0600 Subject: [PATCH] Add workaround for fullscreen debug log causing unresponsive app --- app/main.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/main.ts b/app/main.ts index f54ad640b..c08111a94 100644 --- a/app/main.ts +++ b/app/main.ts @@ -1186,6 +1186,11 @@ async function showDebugLogWindow() { nativeWindowOpen: true, }, parent: mainWindow, + // Electron has [a macOS bug][0] that causes parent windows to become unresponsive if + // it's fullscreen and opens a fullscreen child window. Until that's fixed, we + // prevent the child window from being fullscreenable, which sidesteps the problem. + // [0]: https://github.com/electron/electron/issues/32374 + fullscreenable: !OS.isMacOS(), }; debugLogWindow = createBrowserWindow(options); @@ -1203,6 +1208,9 @@ async function showDebugLogWindow() { debugLogWindow.once('ready-to-show', () => { if (debugLogWindow) { debugLogWindow.show(); + + // Electron sometimes puts the window in a strange spot until it's shown. + debugLogWindow.center(); } }); }