From 249dbc4edd0eb382e9e0bb7dc9d9c1b148882889 Mon Sep 17 00:00:00 2001 From: FliiFe Date: Sat, 17 Mar 2018 21:40:44 +0100 Subject: [PATCH] Add config option to hide on blur On some tiling window manager, simply moving the mouse outside the cerebro window blurs it, which gets very frustrating. This adds a configuration option to disable this behavior --- app/lib/config.js | 1 + app/main/createWindow.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/lib/config.js b/app/lib/config.js index df4420f6..0a3ff6ff 100644 --- a/app/lib/config.js +++ b/app/lib/config.js @@ -30,6 +30,7 @@ const defaultSettings = memoize(() => { firstStart: true, developerMode: false, cleanOnHide: true, + hideOnBlur: true, skipDonateDialog: false, lastShownDonateDialog: null, plugins: {}, diff --git a/app/main/createWindow.js b/app/main/createWindow.js index e9d6eae2..bd679a9c 100644 --- a/app/main/createWindow.js +++ b/app/main/createWindow.js @@ -57,7 +57,7 @@ export default ({ src, isDev }) => { globalShortcut.register(shortcut, toggleMainWindow) mainWindow.on('blur', () => { - if (!isDev()) { + if (!isDev() && config.get('hideOnBlur')) { // Hide window on blur in production // In development we usually use developer tools that can blur a window mainWindow.hide()