-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot create new window after reload the current empty window #11600
Comments
I am also having issues reloading the windows. I have noticed that the electron-main process and the Wouldn't it be better to compare the theia/packages/core/src/electron-main/theia-electron-window.ts Lines 183 to 185 in 0f949c2
@colin-grant-work, could you please take a look? Thank you! Related thread: electron/electron#16863 (comment) Update: diff --git a/arduino-ide-extension/src/electron-main/theia/theia-electron-window.ts b/arduino-ide-extension/src/electron-main/theia/theia-electron-window.ts
index 8c5fd03b..6b2be2cd 100644
--- a/arduino-ide-extension/src/electron-main/theia/theia-electron-window.ts
+++ b/arduino-ide-extension/src/electron-main/theia/theia-electron-window.ts
@@ -64,4 +64,8 @@ export class TheiaElectronWindow extends DefaultTheiaElectronWindow {
this.toDispose
);
}
+
+ protected override isSender(e: IpcMainEvent): boolean {
+ return e.sender.id === this._window.webContents.id;
+ }
} |
@kittaakos Thank you for investigating this. Do you plan on creating a PR on your own? I'll gladly review it. |
Sure. If this seems to be the proper fix, I am happy to push it back. |
It seems pretty reasonable to me. I assume that ids aren't reused by Electron, so comparing between the |
I will take a look next week. Please assign the task to me. |
Bug Description:
New Window does not work after reload the current window.
BTW, you can open a new window (window 2) before reload it (window 1) and reload the window 2. And then, the menu item New Window of window 2 (that means window 2 is actived) does not work anymore, but the menu item New Window of window 1 (that means window 1 is actived) still works.
Steps to Reproduce:
Run the electron example: (We can see the window 1)
Reload the window: (Reload the window 1)
Click the New Window in the menu but it does not work: (Cannot create a new window)
Additional Information
The text was updated successfully, but these errors were encountered: