()
| 3056 | } |
| 3057 | |
| 3058 | async function showQuickCaptureWindow(): Promise<void> { |
| 3059 | // Remember whether ZenNotes was already frontmost. If no ZenNotes window is |
| 3060 | // focused, the panel was summoned from another app (global hotkey / deep |
| 3061 | // link) — dismissing it should hand focus back to that app. |
| 3062 | quickCaptureReturnFocus = !BrowserWindow.getFocusedWindow() |
| 3063 | const win = await ensureQuickCaptureWindow() |
| 3064 | const sourceWindow = BrowserWindow.getFocusedWindow() ?? mainWindow |
| 3065 | if (sourceWindow && sourceWindow.id !== win.id && !sourceWindow.isDestroyed()) { |
| 3066 | inheritWindowWorkspaceSession(sourceWindow, win) |
| 3067 | } |
| 3068 | win.show() |
| 3069 | win.focus() |
| 3070 | } |
| 3071 | |
| 3072 | async function toggleQuickCaptureWindow(): Promise<void> { |
| 3073 | const win = quickCaptureWindow |
no test coverage detected