diff --git a/src/main/apis/app/system/index.ts b/src/main/apis/app/system/index.ts index d8237d6..878bce5 100644 --- a/src/main/apis/app/system/index.ts +++ b/src/main/apis/app/system/index.ts @@ -113,7 +113,7 @@ export function createMenu () { } export function createContextMenu () { - const ClipboardWatcher = process.platform === 'darwin' ? clipboardPoll : clipboardListener + const ClipboardWatcher = process.platform === 'win32' ? clipboardListener : clipboardPoll const isListeningClipboard = db.get('settings.isListeningClipboard') || false if (process.platform === 'darwin' || process.platform === 'win32') { const submenu = buildPicBedListMenu() diff --git a/src/main/lifeCycle/index.ts b/src/main/lifeCycle/index.ts index dce3baa..92194af 100644 --- a/src/main/lifeCycle/index.ts +++ b/src/main/lifeCycle/index.ts @@ -142,7 +142,7 @@ class LifeCycle { windowManager.create(IWindowList.TRAY_WINDOW) windowManager.create(IWindowList.SETTING_WINDOW) const isAutoListenClipboard = db.get('settings.isAutoListenClipboard') || false - const ClipboardWatcher = process.platform === 'darwin' ? clipboardPoll : clipboardListener + const ClipboardWatcher = process.platform === 'win32' ? clipboardListener : clipboardPoll if (isAutoListenClipboard) { db.set('settings.isListeningClipboard', true) ClipboardWatcher.startListening()