From da52d167cc21efb3af687ed1963118ffc8b86a06 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 2 May 2019 15:10:10 -0600 Subject: [PATCH] Prompt to restart Atom when the file system watcher setting changes I experimented with just reloading the Window, but ran into problems. I'm also worried about a situation where there are multiple windows. Since this setting should be changed rarely, I think prompting for a restart is an expedient solution. --- src/config-schema.js | 2 +- src/main-process/atom-application.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config-schema.js b/src/config-schema.js index 65c6d7a25..bd8b604cc 100644 --- a/src/config-schema.js +++ b/src/config-schema.js @@ -329,7 +329,7 @@ const configSchema = { default: 40 }, fileSystemWatcher: { - description: 'Choose the underlying implementation used to watch for filesystem changes. Emulating changes will miss any events caused by applications other than Atom, but may help prevent crashes or freezes.', + description: 'Choose the underlying implementation used to watch for filesystem changes. Emulating changes will miss any events caused by applications other than Atom, but may help prevent crashes or freezes.
This setting will require a relaunch of Atom to take effect.', type: 'string', default: 'experimental', enum: [ diff --git a/src/main-process/atom-application.js b/src/main-process/atom-application.js index d5b577775..d44b2bfa6 100644 --- a/src/main-process/atom-application.js +++ b/src/main-process/atom-application.js @@ -271,6 +271,7 @@ class AtomApplication extends EventEmitter { } this.config.onDidChange('core.titleBar', () => this.promptForRestart()) this.config.onDidChange('core.colorProfile', () => this.promptForRestart()) + this.config.onDidChange('core.fileSystemWatcher', () => this.promptForRestart()) } let optionsForWindowsToOpen = []