diff options
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/main/index.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 4d491a9cc8..bdfc581242 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -1336,6 +1336,13 @@ class ApplicationMain { window.on('show', () => macEventMonitor.start(eventMask, () => windowController.hide())); window.on('hide', () => macEventMonitor.stop()); + window.on('blur', () => { + // Make sure to hide the menubar window when other program captures the focus. + // But avoid doing that when dev tools capture the focus to make it possible to inspect the UI + if (window.isVisible() && !window.webContents.isDevToolsFocused()) { + windowController.hide(); + } + }); tray.on('click', () => windowController.toggle()); } |
