MCPcopy Index your code
hub / github.com/21st-dev/1code / getFocused

Method getFocused

src/main/windows/window-manager.ts:99–112  ·  view source on GitHub ↗

* Get the currently focused window

()

Source from the content-addressed store, hash-verified

97 * Get the currently focused window
98 */
99 getFocused(): BrowserWindow | null {
100 if (this.focusedWindowId !== null) {
101 const win = this.windows.get(this.focusedWindowId)
102 if (win && !win.isDestroyed()) {
103 return win
104 }
105 }
106 // Fallback to BrowserWindow.getFocusedWindow() with destroyed check
107 const focusedWin = BrowserWindow.getFocusedWindow()
108 if (focusedWin && !focusedWin.isDestroyed()) {
109 return focusedWin
110 }
111 return null
112 }
113
114 /**
115 * Get all windows

Callers 2

showLoginPageFunction · 0.80
getWindowFunction · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected