From e8b79d9c42956fd79ae685164a83eadaa35ac4c0 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 16 Dec 2019 08:20:31 +0100 Subject: [PATCH] trace log more window state --- src/vs/code/electron-main/window.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 01eee8e6688..66e312d92de 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -778,6 +778,8 @@ export class CodeWindow extends Disposable implements ICodeWindow { } private validateWindowState(state: IWindowState, displays: Display[]): IWindowState | undefined { + this.logService.trace(`window#validateWindowState: validating window state on ${displays.length} display(s)`, state); + if (typeof state.x !== 'number' || typeof state.y !== 'number' || typeof state.width !== 'number' @@ -796,7 +798,7 @@ export class CodeWindow extends Disposable implements ICodeWindow { if (displays.length === 1) { const displayWorkingArea = this.getWorkingArea(displays[0]); if (displayWorkingArea) { - this.logService.trace('window#validateWindowState: 1 display', displayWorkingArea); + this.logService.trace('window#validateWindowState: 1 monitor working area', displayWorkingArea); if (state.x < displayWorkingArea.x) { state.x = displayWorkingArea.x; // prevent window from falling out of the screen to the left @@ -852,7 +854,7 @@ export class CodeWindow extends Disposable implements ICodeWindow { bounds.x + bounds.width > displayWorkingArea.x && // prevent window from falling out of the screen to the left bounds.y + bounds.height > displayWorkingArea.y // prevent window from falling out of the scree nto the top ) { - this.logService.trace('window#validateWindowState: multi display', displayWorkingArea); + this.logService.trace('window#validateWindowState: multi-monitor working area', displayWorkingArea); return state; } -- GitLab