Change:
Type: <bBug</bTo enter full screen mode, click the and . After entering full screen via the green button, when the mouse moves to the top of the screen, the button display will be incomplete. https://user- VS Code version: Code 1.71.0 (, 2022-09-01T07:25:38.437Z) OS version: Darwin x64 19.6.0 Modes: Sandboxed: No <details<summarySystem Info</summary </details<details<summaryExtensions (8)</summaryExtensionVersion ------ gitlens12.2.1 go0.35.2 remote-ssh0.84.0 remote-ssh-edit0.80.0 cpptools1.12.4 rust-analyzer0.3.1186 vim1.23.2 vscode-todo-highlight1.0.5 (2 theme extensions excluded) </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
I am quite certain this is not something VSCode is doing wrong but some issue with either Electron or the configuration on the users OS. I am not aware of a way for VSCode to make it possible that macOS is not able to draw the full title when you go up with the mouse. Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from:
I tried , same results. Here are the screenshots. !
Did you install a 3rd party software that could modify window management on macOS?
No. I don't have any third party window management software installed.
Does it reproduce with other Electron apps such as ?
I just installed the software and the above problem did not occur.
Can you try to run where is an empty folder? This will ensure Code is starting with a fresh data directory, e.g. no specific settings and without any extensions running.
<img width="624" alt="image" src="https://user-"<img width="283" alt="image" src="https://user-"Same results. Is it possible that it's a system problem? My system is version 10.15. I asked my friend, his system is version 11.0 onwards. Didn't see the problem.
Does setting to false fix the issue? Edit: Nevermind, that setting is only visible on Windows machines.
I'm unable to repro this issue on Big Sur. Did this issue start with 1.71?
Yes. I asked my friend whose system is bigsur and did not have this problem. I've seen this problem in previous versions as well.
Because I think the issue has to do with Electron but I don't have Catalina installed, I'm wondering what was the last stable version of VS Code that was working for you? Below, I have linked to three macOS Universal builds with their Electron versions attached. I'm expecting the issue to be between 1.67.2 and 1.69.2, but I'm not sure yet. If even 1.67.2 has the full screen mode issue, here's a link to 1.65.2 to try: Can you please try the versions and tell me which ones have the full screen mode issue?
<img width="1045" alt="image" src="https://user-"ok <img width="1037" alt="image" src="https://user-"ok <img width="1077" alt="image" src="https://user-"ok
It could be from But, based on , it seems a similar bug was in 1.70.0. I noticed that VS Code only started calling starting in 1.70.0.
Thanks for narrowing down the issue, macOS = 11 have increased titlebar height compared to earlier versions you can see the context on it at . This is not a regression in the API but rather we should adjust the offset provided in to account for the different titlebar heights depending on the OS version similar to
I created a that corresponds to the commit Can you try that build and: the output window and paste the output? There should be some logs specifically about the traffic light position. me whether the fix works? I tried to reset the traffic light position in some cases. Also, something I noted about Big Sur is that while it is in full screen mode, it is not affected by .
<img width="1680" alt="image" src="https://user-"I think it has worked properly.
Thanks! I'll create a PR Because is 0 instead of 22 when one goes fullscreen, the previous behaviour was causing y to be -7.5 instead of 3.5.
Discussing the above fix with , we think this issue requires further investigation on the Electron side. Current investigation shows that value is 0 when application goes fullscreen for all OS versions and that is because in fullscreen the titlebar is drawn by the OS and not Electron. But what is interesting, is that api does not cause the buttons to redraw in macOS = 11 which potential hides this issue in VSCode. Electron decides to redraw the buttons whenever is called depending on whether a view is hosting the buttons, we think this might not be the case when application enters fullscreen in macOS = 11 leading to a no-op call in these versions, refs We will confirm if that is the case and if so, align the behavior of older versions to be the same which will help remove the workaround in VSCode.

Discussion:
private cachedWindowControlStyles: { bgColor: string; fgColor: string } | undefined; private cachedWindowControlHeight: number | undefined; <del> private getMacTitlebarSize() { </del> <ins> private isBigSurOrNewer(): boolean { </ins> const osVersion = this.environmentService.os.release; <del> if (parseFloat(osVersion) >= 20) { // Big Sur increases title bar height </del> <ins> return parseFloat(osVersion) >= 20; } private getMacTitlebarSize() { if (this.isBigSurOrNewer()) { // Big Sur increases title bar height </ins> return 28; }

if (useWindowControlsOverlay(this.configurationService, this.environmentService) || (isMacintosh && isNative && getTitleBarStyle(this.configurationService) === 'custom')) { <del> const newHeight = Math.round(height * getZoomFactor()); </del> <ins> // When the user goes into full screen mode, the height of the title bar becomes 0. // Instead, set it back to the default titlebar height for Catalina users // so that they can have the traffic lights rendered at the proper offset. // Ref https://github.com/microsoft/vscode/issues/159862 const newHeight = (height > 0 || this.isBigSurOrNewer()) ? Math.round(height * getZoomFactor()) : this.getMacTitlebarSize(); </ins> if (newHeight !== this.cachedWindowControlHeight) { this.cachedWindowControlHeight = newHeight; this.nativeHostService.updateWindowControls({ height: newHeight });