-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update accessibility mode on window reload #168246
Conversation
Is this referring to #167960 (comment) ? That would be only for macOS. |
Oh ok great then this should be good to review and merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this have to be a IPC message sent from app.ts
and why can this not be one of the configuration options that we pass into a window here:
const configuration: INativeWindowConfiguration = { |
I'm not familiar with this code - would you recommend I save the value of that before this vscode/src/vs/code/electron-main/app.ts Line 870 in 71cd323
happens and pass that in to all of the open calls?
|
@meganrogge
Same goes for Bottom line: instead of sending an IPC message to the window, I would send this information to the window as part of the config when opening. |
it turns out, we're already passing that in as an option, but not updating the accessibility service on reload
|
@meganrogge there is a way to update the configuration explicitly when doing a window reload, see here:
For example we update some properties here: vscode/src/vs/platform/windows/electron-main/windowImpl.ts Lines 1069 to 1070 in 422b581
I would think we can set accessibility mode too. |
@bpasero Thanks for the code pointers and continued discussion. Based on logging, the values on It seems that consumers of For example: vscode/src/vs/workbench/services/themes/electron-sandbox/nativeHostColorSchemeService.ts Lines 28 to 59 in 60bbd42
When I open a window, the property is known. When I changed the theme to light and reloaded, logging the value of the theme shows that it was not correct (thus the necessity of the storage service) |
@meganrogge theming might do something very special for other reasons, do not take it as an example. The values of the environment service will be updated based on the main side configuration from the |
I tried that and the value was |
I noticed |
@meganrogge a simple example works for me, here are my changes: configuration.verbose = true; In constructor of console.log(this.environmentService.verbose); On first start I get |
It does appear to be working for me now |
Oh I had my old changes still, hopefully it will work when I remove them as well Think I see what's wrong though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You do not need the changes in argv.ts
if you add the property to INativeWindowConfiguration
:
export interface INativeWindowConfiguration extends IWindowConfiguration, NativeParsedArgs, ISandboxConfiguration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need to somewhere read the accessibilitySupport
value in the workbench, no?
@bpasero it was already on |
that already happens here vscode/src/vs/workbench/services/accessibility/electron-sandbox/accessibilityService.ts Line 44 in 84b9f93
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
Thanks for the help @bpasero 👍🏼 |
fixes #167583