Skip to content

Commit

Permalink
window.newWindowDimensions: inherit not working with minimized window (
Browse files Browse the repository at this point in the history
…fixes #26586)
  • Loading branch information
bpasero committed May 15, 2017
1 parent 72c32b2 commit aae145d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/vs/code/electron-main/window.ts
Expand Up @@ -42,7 +42,7 @@ export interface IWindowCreationOptions {
export enum WindowMode {
Maximized,
Normal,
Minimized,
Minimized, // not used anymore, but also cannot remove due to existing stored UI state (needs migration)
Fullscreen
}

Expand Down Expand Up @@ -623,16 +623,14 @@ export class VSCodeWindow {
// get window mode
if (!platform.isMacintosh && this._win.isMaximized()) {
mode = WindowMode.Maximized;
} else if (this._win.isMinimized()) {
mode = WindowMode.Minimized;
} else {
mode = WindowMode.Normal;
}

// we don't want to save minimized state, only maximized or normal
if (mode === WindowMode.Maximized) {
state.mode = WindowMode.Maximized;
} else if (mode !== WindowMode.Minimized) {
} else {
state.mode = WindowMode.Normal;
}

Expand Down

0 comments on commit aae145d

Please sign in to comment.