Perf: stop clipboard listening when app quit

This commit is contained in:
萌萌哒赫萝 2023-04-10 19:09:57 +08:00
parent bfa41be2ec
commit 993d2ac4de

View File

@ -269,6 +269,8 @@ class LifeCycle {
globalShortcut.unregisterAll() globalShortcut.unregisterAll()
bus.removeAllListeners() bus.removeAllListeners()
server.shutdown() server.shutdown()
const clipboardWatcher = process.platform === 'darwin' ? clipboardPoll : clipboardListener
clipboardWatcher.stopListening()
}) })
// Exit cleanly on request from parent process in development mode. // Exit cleanly on request from parent process in development mode.
if (isDevelopment) { if (isDevelopment) {