提交 db482352 编写于 作者: T Tereza Tomcova 提交者: Benjamin Pasero

Set relaunch command for window (for #13905)

上级 6f42a236
......@@ -1318,6 +1318,18 @@ declare namespace Electron {
* Note: This API is available only on Windows.
*/
setThumbnailToolTip(toolTip: string): boolean;
/**
* Sets the application id, app icon, relaunch command and relaunch display name
* for the given window. appIconIndex should be set to 0 if the app icon
* file only has a single icon.
*/
setAppDetails(options: {
appId?: string;
appIconPath?: string;
appIconIndex?: number;
relaunchCommand?: string;
relaunchDisplayName?: string;
}): void;
/**
* Same as webContents.showDefinitionForSelection().
* Note: This API is available only on macOS.
......
......@@ -219,6 +219,15 @@ export class VSCodeWindow {
this._win.setSheetOffset(22); // offset dialogs by the height of the custom title bar if we have any
}
// Set relaunch command
if (platform.isWindows && product.win32AppUserModelId && typeof this._win.setAppDetails === 'function') {
this._win.setAppDetails({
appId: product.win32AppUserModelId,
relaunchCommand: `"${process.execPath}" -n`,
relaunchDisplayName: product.nameLong
});
}
if (isFullscreenOrMaximized) {
this.win.maximize();
......@@ -769,4 +778,4 @@ export class VSCodeWindow {
this._win = null; // Important to dereference the window object to allow for GC
}
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册