Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Correct initial window size on Windows secondary display with differe…
…nt scaling factor (#146499)
  • Loading branch information
gjsjohnmurray committed Jul 19, 2022
commit 02b2a7214cec58a55c5083019964c1eed2c4b02c
4 changes: 3 additions & 1 deletion 4 src/vs/platform/windows/electron-main/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,12 @@ export class CodeWindow extends Disposable implements ICodeWindow {
// to open the window has a larger resolution than the primary display, the window will not size
// correctly unless we set the bounds again (https://github.com/microsoft/vscode/issues/74872)
//
// Extended to cover Windows as well as Mac (https://github.com/microsoft/vscode/issues/146499)
//
// However, when running with native tabs with multiple windows we cannot use this workaround
// because there is a potential that the new window will be added as native tab instead of being
// a window on its own. In that case calling setBounds() would cause https://github.com/microsoft/vscode/issues/75830
if (isMacintosh && hasMultipleDisplays && (!useNativeTabs || BrowserWindow.getAllWindows().length === 1)) {
if ((isMacintosh || isWindows) && hasMultipleDisplays && (!useNativeTabs || BrowserWindow.getAllWindows().length === 1)) {
if ([this.windowState.width, this.windowState.height, this.windowState.x, this.windowState.y].every(value => typeof value === 'number')) {
const ensuredWindowState = this.windowState as Required<IWindowState>;
this._win.setBounds({
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.