You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In VSC 1.40, window titles are missing in accessibility apps #84195
electronIssues and items related to Electronhelp wantedIssues identified as good community contribution opportunitiesinfo-neededIssue requires more information from posterupstreamIssue identified as 'upstream' component related (exists outside of VS Code)
I use a program called Witch, on my Mac, to navigate between windows. It is useful for jumping to a specific VS Code window. The window's title appears in Witch, which is usually the workspace for that window.
However, since upgrading to VS Code 1.40.0, all window titles only appear as "(Untitled)". Was there a change regarding this recently? Perhaps related to Electron? This issue seems to affect any Mac app that relies on OS accessibility features to access a window's title.
To reproduce this issue, you must be using VSC 1.40, and have at least two windows open in VSC. Their titles will then appear as "(Untitled)" in any of a number of Mac accessibility apps, including Witch. I already tested with all extensions disabled. I tested with latest Insiders as of 2019-11-08. The issue does not exist in VSC 1.39.2.
This setting must be enabled to cause this issue:
"window.newWindowDimensions": "maximized"
I'm on MacOS 10.14.6 (18G1012).
Screenshot:
VS Code version: Code 1.40.0 (86405ea, 2019-11-06T17:09:34.601Z)
OS version: Darwin x64 18.7.0
Reacted by Oliver Joseph Ash, larry drebes, Everton Ribeiro, Gullit Miranda, Tomasz Cudok, Seb, lovepocky, Li Juen Chang, Robert Kopaczewski, Matthew J. Clemente and 11 more
Also seeing the same regression, except I'm using Contexts instead of Witch.
Reacted by Nico Stewart, Everton Ribeiro, Jean-Denis Caron, Tomasz Cudok, Will Gorman, Yoad Snapir, Li Juen Chang, Matthew Ruston - WellSky, Matthew J. Clemente, J. Ryan Stinnett and 4 more
changed the title [-]Window titles appear as "(Untitled)"[/-][+]In VSC 1.40, window titles appear as "(Untitled)" in accessibility apps[/+]on Nov 8, 2019
This appears to be a regression upstream with Electron. I have submitted electron/electron#21462 with a potential fix, so hopefully that can land, be backported, and then we can update VS Code with the fixed version.
To summarise the problem, Electron's AtomNSWindowimplementsaccessibilityAttributeValue to provide various accessibility info to the OS, including window titles.
Chromium 75 changed to Apple's newer accessibility API for window titles in the super class that AtomNSWindow inherits from. macOS still supports both the old and new style APIs, but it will prefer the new style if it is implemented. This means the Electron window title is being ignored because the newer API at the Chromium level has taken precedence.
This is a regression that has been present since Electron 6.0.0 (the first release including the Chromium change above).
Reacted by Robo, Alex Langhart, Andrei Enache, ZhangZhiqi, zhiqiang21, Benjamin Pasero, Seb, Tomasz Cudok, Will Gorman, Charles Scalfani and 1 more
J. Ryan Stinnett (@jryans) Thank You! One thing I can't figure out is how one application (Hyper-Switch) is able to show the titles and another (Contexts and more..) cannot.
If it's OSX that ignores the titles - all external applications should not be able to access this information.
Any idea?
Hard to be sure without reversing each app... but at least on my system, the window title was correct in window managers such as the built-in Mission Control view but empty via accessibility APIs. So, Contexts and other affected apps are presumably using accessibility, while HyperSwitch must be using some other data source perhaps like Mission Control does.
The problem with that method is that it doesn't allow interactions with the window—closing, minimizing, etc. must be done via Accessibility. So for our app Witch, it's a non-solution, unfortunately.
electronIssues and items related to Electronhelp wantedIssues identified as good community contribution opportunitiesinfo-neededIssue requires more information from posterupstreamIssue identified as 'upstream' component related (exists outside of VS Code)
Activity
bpasero commentedon Nov 8, 2019
Robo (@deepak1556) we do give the window a title here:
vscode/src/vs/code/electron-main/window.ts
Line 129 in 15bfc40
I am not sure why "Untitled" would show up, but possibly a E6 regression in this case.
Gary (@garyking) do you see the same with other electron app, e.g. try Electron Fiddle: https://electronjs.org/fiddle
OliverJAsh commentedon Nov 8, 2019
Also seeing the same regression, except I'm using Contexts instead of Witch.
bpasero commentedon Nov 8, 2019
Oliver Joseph Ash (@OliverJAsh) Gary (@garyking) do you see the same when you run a different Electron application such as Electron Fiddle: https://electronjs.org/fiddle
OliverJAsh commentedon Nov 8, 2019
The title seems to work with that ("Hello World 2!"):
[-]Window titles appear as "(Untitled)"[/-][+]In VSC 1.40, window titles appear as "(Untitled)" in accessibility apps[/+]antonblock commentedon Nov 8, 2019
Also seeing this with Contexts on MacOS 10.15.1. It began after upgrading to 1.40.0 yesterday.
ltd commentedon Nov 8, 2019
Also, seeing this with my hammerspoon scripts. began with 1.40.0
25 remaining items
jryans commentedon Dec 10, 2019
This appears to be a regression upstream with Electron. I have submitted electron/electron#21462 with a potential fix, so hopefully that can land, be backported, and then we can update VS Code with the fixed version.
To summarise the problem, Electron's
AtomNSWindowimplementsaccessibilityAttributeValueto provide various accessibility info to the OS, including window titles.Chromium 75 changed to Apple's newer accessibility API for window titles in the super class that
AtomNSWindowinherits from. macOS still supports both the old and new style APIs, but it will prefer the new style if it is implemented. This means the Electron window title is being ignored because the newer API at the Chromium level has taken precedence.This is a regression that has been present since Electron 6.0.0 (the first release including the Chromium change above).
bpasero commentedon Dec 11, 2019
J. Ryan Stinnett (@jryans) thanks a lot ❤️
yoadsn commentedon Dec 12, 2019
J. Ryan Stinnett (@jryans) Thank You! One thing I can't figure out is how one application (Hyper-Switch) is able to show the titles and another (Contexts and more..) cannot.
If it's OSX that ignores the titles - all external applications should not be able to access this information.
Any idea?
jryans commentedon Dec 12, 2019
Hard to be sure without reversing each app... but at least on my system, the window title was correct in window managers such as the built-in Mission Control view but empty via accessibility APIs. So, Contexts and other affected apps are presumably using accessibility, while HyperSwitch must be using some other data source perhaps like Mission Control does.
bump electron to 6.1.6, fixes microsoft#84195 missing window titles i…
sergei-dyshel commentedon Dec 12, 2019
Yoad Snapir (@yoadsn)
Accessibility API (
NSAccessibilityTitleAttribute)isn't the only way to get window title. There is alsoCGWindowListCopyWindowInfowhich does report correct title of vscode windows and may be probably used by HyperSwitch.rg-manytricks commentedon Dec 13, 2019
The problem with that method is that it doesn't allow interactions with the window—closing, minimizing, etc. must be done via Accessibility. So for our app Witch, it's a non-solution, unfortunately.
-rob.
mjclemente commentedon Dec 13, 2019
rg-manytricks Huge fan of your app - use it constantly - hoping the upstream fix resolves this. It's really frustrating.
bump electron to 6.1.6, fixes missing window titles in accessibility …
ltd commentedon Dec 17, 2019
confirm, seeing titles in the latest insider build.
ariofrio commentedon Jan 9, 2020
FWIW, this also affects conditional activation groups in BetterTouchTool.