Skip to content

fix(electron): make New Window work on macOS with an open graph - #47

Open
soizo wants to merge 1 commit into
logseq:version/filefrom
soizo:fix/electron-new-window
Open

fix(electron): make New Window work on macOS with an open graph#47
soizo wants to merge 1 commit into
logseq:version/filefrom
soizo:fix/electron-new-window

Conversation

@soizo

@soizo soizo commented Aug 26, 2026

Copy link
Copy Markdown

I reproduced this on macOS (Apple Silicon) with Logseq OG 1.0.0 build 92, based on Electron 41.7.1. File → New Window and Command+N did nothing when a graph was open, while a clean profile worked.

In the optimized build, get-active-window-graph-path compiles the Electron isFocused() call as $isFocused$(). The resulting exception happens before graph persistence or window creation.

This change uses the existing BrowserWindow.getFocusedWindow() helper instead and keeps the current persist-before-open flow.

I tested it with an optimized Electron build and an isolated application profile. In that test the window count changed from 1 to 2, and the new window loaded and received focus.

@soizo soizo changed the title fix(electron): make New Window work with an open graph fix(electron): make New Window work on macOS with an open graph Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot open new window on macOS

1 participant