Skip to content

Commit ca66517

Browse files
authored
Revert back to Electron 12.0.7 (microsoft#126026)
* Revert "chore: bump electron@12.0.9" This reverts commit 286b643. * Revert "macOS - workaround fullscreen window regression (microsoft#125122)" This reverts commit a286059.
1 parent 6370d95 commit ca66517

File tree

5 files changed

+13
-23
lines changed

5 files changed

+13
-23
lines changed

.yarnrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
disturl "https://electronjs.org/headers"
2-
target "12.0.9"
2+
target "12.0.7"
33
runtime "electron"

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@
6060
"git": {
6161
"name": "electron",
6262
"repositoryUrl": "https://github.com/electron/electron",
63-
"commitHash": "30f82dd1cb8140ccb5c6a4960eef8e3b8c15eeba"
63+
"commitHash": "8d55658bfa8b5983e1a90ad079c2e2ac91ee7af0"
6464
}
6565
},
6666
"isOnlyProductionDependency": true,
6767
"license": "MIT",
68-
"version": "12.0.9"
68+
"version": "12.0.7"
6969
},
7070
{
7171
"component": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
"cssnano": "^4.1.11",
126126
"debounce": "^1.0.0",
127127
"deemon": "^1.4.0",
128-
"electron": "12.0.9",
128+
"electron": "12.0.7",
129129
"eslint": "6.8.0",
130130
"eslint-plugin-jsdoc": "^19.1.0",
131131
"event-stream": "3.3.4",

src/vs/platform/windows/electron-main/windowsStateHandler.ts

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,9 @@ export class WindowsStateHandler extends Disposable {
232232
const windowConfig = this.configurationService.getValue<IWindowSettings | undefined>('window');
233233

234234
// Window state is not from a previous session: only allow fullscreen if we inherit it or user wants fullscreen
235-
// or to address a Electron issue on macOS (https://github.com/microsoft/vscode/issues/125122)
236235
let allowFullscreen: boolean;
237236
if (state.hasDefaultState) {
238-
const configAllowsFullScreen = !!(windowConfig?.newWindowDimensions && ['fullscreen', 'inherit', 'offset'].indexOf(windowConfig.newWindowDimensions) >= 0);
239-
allowFullscreen = configAllowsFullScreen || (isMacintosh && windowConfig?.nativeFullScreen !== false);
237+
allowFullscreen = !!(windowConfig?.newWindowDimensions && ['fullscreen', 'inherit', 'offset'].indexOf(windowConfig.newWindowDimensions) >= 0);
240238
}
241239

242240
// Window state is from a previous session: only allow fullscreen when we got updated or user wants to restore
@@ -339,22 +337,14 @@ export class WindowsStateHandler extends Disposable {
339337
// Compute x/y based on display bounds
340338
// Note: important to use Math.round() because Electron does not seem to be too happy about
341339
// display coordinates that are not absolute numbers.
342-
let state: INewWindowState = defaultWindowState();
340+
let state = defaultWindowState();
343341
state.x = Math.round(displayToUse.bounds.x + (displayToUse.bounds.width / 2) - (state.width! / 2));
344342
state.y = Math.round(displayToUse.bounds.y + (displayToUse.bounds.height / 2) - (state.height! / 2));
345343

344+
// Check for newWindowDimensions setting and adjust accordingly
346345
const windowConfig = this.configurationService.getValue<IWindowSettings | undefined>('window');
347346
let ensureNoOverlap = true;
348-
349-
// TODO@electron macOS: if the current window is fullscreen and native fullscreen
350-
// is not disabled, always open a new window in fullscreen. This is a workaround
351-
// for regression https://github.com/microsoft/vscode/issues/125122
352-
if (isMacintosh && windowConfig?.nativeFullScreen !== false && lastActive?.isFullScreen) {
353-
state.mode = WindowMode.Fullscreen;
354-
}
355-
356-
// Adjust according to `newWindowDimensions` user setting
357-
else if (windowConfig?.newWindowDimensions) {
347+
if (windowConfig?.newWindowDimensions) {
358348
if (windowConfig.newWindowDimensions === 'maximized') {
359349
state.mode = WindowMode.Maximized;
360350
ensureNoOverlap = false;
@@ -377,7 +367,7 @@ export class WindowsStateHandler extends Disposable {
377367
state = this.ensureNoOverlap(state);
378368
}
379369

380-
state.hasDefaultState = true; // flag as default state
370+
(state as INewWindowState).hasDefaultState = true; // flag as default state
381371

382372
return state;
383373
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,10 +3001,10 @@ electron-to-chromium@^1.3.723:
30013001
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.737.tgz#196f2e9656f4f3c31930750e1899c091b72d36b5"
30023002
integrity sha512-P/B84AgUSQXaum7a8m11HUsYL8tj9h/Pt5f7Hg7Ty6bm5DxlFq+e5+ouHUoNQMsKDJ7u4yGfI8mOErCmSH9wyg==
30033003

3004-
electron@12.0.9:
3005-
version "12.0.9"
3006-
resolved "https://registry.yarnpkg.com/electron/-/electron-12.0.9.tgz#d582afa8f6fc0c429606f0961a4c89b376994823"
3007-
integrity sha512-p5aEt1tIh/PYjwN+6MHTc5HtW529XR9r4Qlj9PPcSb5ubkotSsS0BtWJoRPhDenSAN8sgHk3sbZLxXPJtdnRYA==
3004+
electron@12.0.7:
3005+
version "12.0.7"
3006+
resolved "https://registry.yarnpkg.com/electron/-/electron-12.0.7.tgz#e0fca2c8be34cb7da48c4d15cfb1d2ad666d2718"
3007+
integrity sha512-722TZNKDuLpEmj96AzTYFKHaJEH98xgOBH0aldStaPXI1xDFfb9SJQQuirvwFlkwG5OqQdz6Ne3OwwJ7Dbs5nQ==
30083008
dependencies:
30093009
"@electron/get" "^1.0.1"
30103010
"@types/node" "^14.6.2"

0 commit comments

Comments
 (0)