From 0976b51a775418621eeb7c58e9c5eada42ed492a Mon Sep 17 00:00:00 2001 From: Ryan Adolf Date: Sat, 16 Dec 2017 17:42:38 -0800 Subject: [PATCH] Make framless window draggable on LInux --- src/vs/code/electron-main/window.ts | 2 +- src/vs/platform/windows/common/windows.ts | 2 +- src/vs/workbench/electron-browser/bootstrap/preload.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index d46f257b807..affd574e0ed 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -590,7 +590,7 @@ export class CodeWindow implements ICodeWindow { // Theme windowConfiguration.baseTheme = this.getBaseTheme(); windowConfiguration.backgroundColor = this.getBackgroundColor(); - windowConfiguration.hiddenTitleBar = this.hasHiddenTitleBarStyle(); + windowConfiguration.frameless = this.hasHiddenTitleBarStyle() && !isMacintosh; // Perf Counters windowConfiguration.perfEntries = exportEntries(); diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index 5c52ab96dcd..e06ba5a0cb1 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -323,7 +323,7 @@ export interface IWindowConfiguration extends ParsedArgs, IOpenFileRequest { highContrast?: boolean; baseTheme?: string; backgroundColor?: string; - hiddenTitleBar?: boolean; + frameless?: boolean; accessibilitySupport?: boolean; perfEntries: PerformanceEntry[]; diff --git a/src/vs/workbench/electron-browser/bootstrap/preload.js b/src/vs/workbench/electron-browser/bootstrap/preload.js index 7599c094c10..894c63e22de 100644 --- a/src/vs/workbench/electron-browser/bootstrap/preload.js +++ b/src/vs/workbench/electron-browser/bootstrap/preload.js @@ -23,8 +23,8 @@ const baseTheme = config.baseTheme || 'vs'; document.body.className = 'monaco-shell ' + baseTheme; - // makes the window draggable if there is no frame on Windows - if (config.execPath.endsWith('exe') && config.hiddenTitleBar) { + // makes the window draggable if there is no frame + if (config.frameless) { document.documentElement.style.webkitAppRegion = 'drag'; document.documentElement.style.height = '100%'; } -- GitLab