Skip to content

Commit ee327ef

Browse files
author
Akos Kitta
committed
patched to fix the window reloading on windows
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
1 parent 960d8db commit ee327ef

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

arduino-ide-extension/src/browser/theia/workspace/workspace-service.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,4 @@ export class WorkspaceService extends TheiaWorkspaceService {
110110
}
111111
}
112112

113-
protected openWindow(uri: FileStat, options?: WorkspaceInput): void {
114-
const workspacePath = new URI(uri.uri).path.toString();
115-
try {
116-
this.openNewWindow(workspacePath);
117-
if (this.shouldPreserveWindow(options)) {
118-
setTimeout(() => window.close(), 10);
119-
}
120-
} catch (error) {
121-
// Fall back to reloading the current window in case the browser has blocked the new window
122-
(this as any)._workspace = uri;
123-
this.logger.error(error.toString()).then(() => this.reloadWindow());
124-
}
125-
}
126-
127113
}

electron/build/patch/electron-main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ const { fork } = require('child_process');
2222
const { app, dialog, shell, BrowserWindow, ipcMain, Menu, globalShortcut } = electron;
2323
const { ElectronSecurityToken } = require('@theia/core/lib/electron-common/electron-token');
2424

25+
// Fix the window reloading issue, see: https://github.com/electron/electron/issues/22119
26+
app.allowRendererProcessReuse = false;
27+
2528
const applicationName = `Arduino Pro IDE`;
2629
const isSingleInstance = false;
2730
const disallowReloadKeybinding = false;

0 commit comments

Comments
 (0)