Skip to content

Commit bc1088e

Browse files
authored
proper check for WCO (microsoft#165384)
fixes microsoft#165337
1 parent db48079 commit bc1088e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/vs/workbench/electron-sandbox/parts/titlebar/titlebarPart.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { getZoomFactor } from 'vs/base/browser/browser';
6+
import { getZoomFactor, isWCOVisible } from 'vs/base/browser/browser';
77
import { $, addDisposableListener, append, EventType, hide, show } from 'vs/base/browser/dom';
88
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
99
import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
@@ -165,8 +165,7 @@ export class TitlebarPart extends BrowserTitleBarPart {
165165
}
166166

167167
// Window Controls (Native Windows/Linux)
168-
const hasWindowControlsOverlay = typeof (navigator as any).windowControlsOverlay !== 'undefined';
169-
if (!isMacintosh && getTitleBarStyle(this.configurationService) !== 'native' && !hasWindowControlsOverlay && this.windowControls) {
168+
if (!isMacintosh && getTitleBarStyle(this.configurationService) !== 'native' && !isWCOVisible() && this.windowControls) {
170169
// Minimize
171170
const minimizeIcon = append(this.windowControls, $('div.window-icon.window-minimize' + Codicon.chromeMinimize.cssSelector));
172171
this._register(addDisposableListener(minimizeIcon, EventType.CLICK, e => {

0 commit comments

Comments
 (0)