( event: Electron.IpcMainInvokeEvent, )
| 30 | |
| 31 | // Helper to get window from IPC event |
| 32 | function getWindowFromEvent( |
| 33 | event: Electron.IpcMainInvokeEvent, |
| 34 | ): BrowserWindow | null { |
| 35 | const webContents = event.sender |
| 36 | const win = BrowserWindow.fromWebContents(webContents) |
| 37 | return win && !win.isDestroyed() ? win : null |
| 38 | } |
| 39 | |
| 40 | // Register IPC handlers for window operations (only once) |
| 41 | let ipcHandlersRegistered = false |
no outgoing calls
no test coverage detected