Skip to content

Handle opening 2 instances of GDevelop#8167

Closed
ClementPasteau wants to merge 2 commits intomasterfrom
improve-electron-windows
Closed

Handle opening 2 instances of GDevelop#8167
ClementPasteau wants to merge 2 commits intomasterfrom
improve-electron-windows

Conversation

@ClementPasteau
Copy link
Collaborator

  • this creates a window inside the existing electron app, instead of a new app, allowing to have everything under 1 app in the taskbar
  • it is created in a different context, allowing indexedDb and storage to be different, for firebase to be independent, so allow logging in to different accounts
  • previews are independent, so we can start previews for each window and they're fully working
  • Fix closing a window now automatically closes the preview(s) associated to avoid having a crash when closing the preview
  • protect all calls to avoid sending messages from/to non-existing sources

@ClementPasteau ClementPasteau requested a review from 4ian as a code owner January 26, 2026 14:54
@ClementPasteau ClementPasteau force-pushed the improve-electron-windows branch from 176cc57 to 3164e40 Compare February 2, 2026 14:53
@ClementPasteau
Copy link
Collaborator Author

@codex

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3164e40a39

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +98 to +101
});

// Create a new window in the existing process
createNewWindow(secondInstanceArgs);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate second-instance args to new windows

When a second instance is launched, you parse secondInstanceArgs and create a new window, but the renderer still reads arguments via remote.getGlobal('args') (see Window.getArguments()), and global['args'] is only set once at app startup. That means windows opened from a second launch will still see the first instance’s arguments (e.g., the project path or --disable-update-check), so the new window won’t open the intended project/flags. This shows up when users launch the app a second time with a different project path.

Useful? React with 👍 / 👎.

@ClementPasteau
Copy link
Collaborator Author

closing for #8205

@ClementPasteau ClementPasteau deleted the improve-electron-windows branch February 5, 2026 07:52
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.

1 participant