MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / showQuickCaptureWindow

Function showQuickCaptureWindow

apps/desktop/src/main/index.ts:3058–3070  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3056}
3057
3058async 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
3072async function toggleQuickCaptureWindow(): Promise<void> {
3073 const win = quickCaptureWindow

Callers 1

toggleQuickCaptureWindowFunction · 0.85

Calls 2

ensureQuickCaptureWindowFunction · 0.85

Tested by

no test coverage detected