diff --git a/lib/pomodoro-edit.js b/lib/pomodoro-edit.js index f35a005..9d119b4 100644 --- a/lib/pomodoro-edit.js +++ b/lib/pomodoro-edit.js @@ -9,6 +9,7 @@ import Core, { getReplacementRange } from '@seachicken/pomodoro-edit-core'; let _tray; let _disposables = new CompositeDisposable(); let _core; +let _backgroundThrottling; export function activate() { if (!inkdrop.isMainWindow) return; @@ -18,6 +19,9 @@ export function activate() { const modulePath = `${app.getAppPath()}/node_modules`; require(`${modulePath}/codemirror/addon/hint/show-hint`); + _backgroundThrottling = inkdrop.window.webContents.backgroundThrottling; + inkdrop.window.webContents.backgroundThrottling = false; + if (process.platform === 'win32') { _tray = new Tray(`${__dirname}/../resources/icon.ico`); } else { @@ -40,6 +44,7 @@ export function deactivate() { _core.closeServer(); _core.stopTimer(); _tray.destroy(); + inkdrop.window.webContents.backgroundThrottling = _backgroundThrottling; } function _registerCommands(editor) {