mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-09 04:16:38 +00:00
patched to fix the window reloading on windows
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
parent
960d8dba2e
commit
ee327eff18
@ -110,18 +110,4 @@ export class WorkspaceService extends TheiaWorkspaceService {
|
||||
}
|
||||
}
|
||||
|
||||
protected openWindow(uri: FileStat, options?: WorkspaceInput): void {
|
||||
const workspacePath = new URI(uri.uri).path.toString();
|
||||
try {
|
||||
this.openNewWindow(workspacePath);
|
||||
if (this.shouldPreserveWindow(options)) {
|
||||
setTimeout(() => window.close(), 10);
|
||||
}
|
||||
} catch (error) {
|
||||
// Fall back to reloading the current window in case the browser has blocked the new window
|
||||
(this as any)._workspace = uri;
|
||||
this.logger.error(error.toString()).then(() => this.reloadWindow());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -22,6 +22,9 @@ const { fork } = require('child_process');
|
||||
const { app, dialog, shell, BrowserWindow, ipcMain, Menu, globalShortcut } = electron;
|
||||
const { ElectronSecurityToken } = require('@theia/core/lib/electron-common/electron-token');
|
||||
|
||||
// Fix the window reloading issue, see: https://github.com/electron/electron/issues/22119
|
||||
app.allowRendererProcessReuse = false;
|
||||
|
||||
const applicationName = `Arduino Pro IDE`;
|
||||
const isSingleInstance = false;
|
||||
const disallowReloadKeybinding = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user