Skip to content

Commit

Permalink
Add config option to hide on blur
Browse files Browse the repository at this point in the history
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
  • Loading branch information
FliiFe committed Mar 17, 2018
1 parent 74a53e5 commit 249dbc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const defaultSettings = memoize(() => {
firstStart: true,
developerMode: false,
cleanOnHide: true,
hideOnBlur: true,
skipDonateDialog: false,
lastShownDonateDialog: null,
plugins: {},
Expand Down
2 changes: 1 addition & 1 deletion app/main/createWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 249dbc4

Please sign in to comment.