Skip to content

Commit

Permalink
linux - disable window border when WCO (#225785)
Browse files Browse the repository at this point in the history
* linux - disable window border when WCO

* .
  • Loading branch information
bpasero committed Aug 16, 2024
1 parent 00f2a27 commit 9ef11ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/vs/workbench/browser/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { IConfigurationChangeEvent, IConfigurationService } from 'vs/platform/co
import { ITitleService } from 'vs/workbench/services/title/browser/titleService';
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { StartupKind, ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle';
import { getMenuBarVisibility, IPath, hasNativeTitlebar, hasCustomTitlebar, TitleBarSetting, CustomTitleBarVisibility } from 'vs/platform/window/common/window';
import { getMenuBarVisibility, IPath, hasNativeTitlebar, hasCustomTitlebar, TitleBarSetting, CustomTitleBarVisibility, useWindowControlsOverlay } from 'vs/platform/window/common/window';
import { IHostService } from 'vs/workbench/services/host/browser/host';
import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
Expand Down Expand Up @@ -559,7 +559,8 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
private updateWindowsBorder(skipLayout = false) {
if (
isWeb ||
isWindows || // not working well with zooming and window control overlays
isWindows || // not working well with zooming (border often not visible)
useWindowControlsOverlay(this.configurationService) || // not working with WCO (border cannot draw over the overlay)
hasNativeTitlebar(this.configurationService)
) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/electron-sandbox/desktop.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ import product from 'vs/platform/product/common/product';
'window.experimentalControlOverlay': {
'type': 'boolean',
'included': isLinux,
'markdownDescription': localize('window.experimentalControlOverlay', "Show the native window controls when {0} is set to `custom`.", '`#window.titleBarStyle#`'),
'markdownDescription': localize('window.experimentalControlOverlay', "Show the native window controls when {0} is set to `custom` (Linux only).", '`#window.titleBarStyle#`'),
'default': product.quality !== 'stable', // TODO@bpasero disable by default in stable for now (TODO@bpasero TODO@benibenj flip when custom title is default)
},
'window.customTitleBarVisibility': {
Expand Down

0 comments on commit 9ef11ed

Please sign in to comment.