deepak1556 2021-06-24 12:23:22 +09:00
parent a3fc50b500
commit 3caebff71e
5 changed files with 13 additions and 23 deletions

View file

@ -1,3 +1,3 @@
disturl "https://electronjs.org/headers"
target "12.0.11"
target "12.0.12"
runtime "electron"

View file

@ -60,12 +60,12 @@
"git": {
"name": "electron",
"repositoryUrl": "https://github.com/electron/electron",
"commitHash": "78ce1d975836f8a4cd5ad4692d0e44f97e228d90"
"commitHash": "088bc334f0e469c330bc15078de8c250a4f195fc"
}
},
"isOnlyProductionDependency": true,
"license": "MIT",
"version": "12.0.11"
"version": "12.0.12"
},
{
"component": {

View file

@ -126,7 +126,7 @@
"cssnano": "^4.1.11",
"debounce": "^1.0.0",
"deemon": "^1.4.0",
"electron": "12.0.11",
"electron": "12.0.12",
"eslint": "6.8.0",
"eslint-plugin-jsdoc": "^19.1.0",
"event-stream": "3.3.4",

View file

@ -232,11 +232,9 @@ export class WindowsStateHandler extends Disposable {
const windowConfig = this.configurationService.getValue<IWindowSettings | undefined>('window');
// Window state is not from a previous session: only allow fullscreen if we inherit it or user wants fullscreen
// or to address a Electron issue on macOS (https://github.com/microsoft/vscode/issues/125122)
let allowFullscreen: boolean;
if (state.hasDefaultState) {
const configAllowsFullScreen = !!(windowConfig?.newWindowDimensions && ['fullscreen', 'inherit', 'offset'].indexOf(windowConfig.newWindowDimensions) >= 0);
allowFullscreen = configAllowsFullScreen || (isMacintosh && windowConfig?.nativeFullScreen !== false);
allowFullscreen = !!(windowConfig?.newWindowDimensions && ['fullscreen', 'inherit', 'offset'].indexOf(windowConfig.newWindowDimensions) >= 0);
}
// 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 {
// Compute x/y based on display bounds
// Note: important to use Math.round() because Electron does not seem to be too happy about
// display coordinates that are not absolute numbers.
let state: INewWindowState = defaultWindowState();
let state = defaultWindowState();
state.x = Math.round(displayToUse.bounds.x + (displayToUse.bounds.width / 2) - (state.width! / 2));
state.y = Math.round(displayToUse.bounds.y + (displayToUse.bounds.height / 2) - (state.height! / 2));
// Check for newWindowDimensions setting and adjust accordingly
const windowConfig = this.configurationService.getValue<IWindowSettings | undefined>('window');
let ensureNoOverlap = true;
// TODO@electron macOS: if the current window is fullscreen and native fullscreen
// is not disabled, always open a new window in fullscreen. This is a workaround
// for regression https://github.com/microsoft/vscode/issues/125122
if (isMacintosh && windowConfig?.nativeFullScreen !== false && lastActive?.isFullScreen) {
state.mode = WindowMode.Fullscreen;
}
// Adjust according to `newWindowDimensions` user setting
else if (windowConfig?.newWindowDimensions) {
if (windowConfig?.newWindowDimensions) {
if (windowConfig.newWindowDimensions === 'maximized') {
state.mode = WindowMode.Maximized;
ensureNoOverlap = false;
@ -377,7 +367,7 @@ export class WindowsStateHandler extends Disposable {
state = this.ensureNoOverlap(state);
}
state.hasDefaultState = true; // flag as default state
(state as INewWindowState).hasDefaultState = true; // flag as default state
return state;
}

View file

@ -3039,10 +3039,10 @@ electron-to-chromium@^1.3.723:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.737.tgz#196f2e9656f4f3c31930750e1899c091b72d36b5"
integrity sha512-P/B84AgUSQXaum7a8m11HUsYL8tj9h/Pt5f7Hg7Ty6bm5DxlFq+e5+ouHUoNQMsKDJ7u4yGfI8mOErCmSH9wyg==
electron@12.0.11:
version "12.0.11"
resolved "https://registry.yarnpkg.com/electron/-/electron-12.0.11.tgz#555dc1cf663e320f2f2cbdf89319352b08fc59f2"
integrity sha512-6gPjcce3QCeAWZ8UVAqVy6os+86D5BcxgkIzlROxX89u+du/i7WpZXF5F1vgv419rspds9OHejP3JrJnoUGh6w==
electron@12.0.12:
version "12.0.12"
resolved "https://registry.yarnpkg.com/electron/-/electron-12.0.12.tgz#886d1589ebf7fb995d2e2327ef5506d27d58188d"
integrity sha512-6E6dyjuJcGpgJPnsWY7dp1Xhha/NPigNDhxlmdKPwvso8DntFGrGt0SPhi1/wfaWZsXW5wqHBGIP4IN2cZ75WQ==
dependencies:
"@electron/get" "^1.0.1"
"@types/node" "^14.6.2"