Repository navigation
Fixes #134612: Added electron flags for wayland - #135191
Muhammad Zohaib Aslam (zzeebbii) wants to merge 1 commit into
Conversation
|
Robo (@deepak1556) can you please at least start the workflows for this PR? :) |
Robo (deepak1556)
left a comment
There was a problem hiding this comment.
Thanks for working on this, left some style comments
|
Additionally it would be good to implement a |
e67c2e8 to
2cc4453
Compare
Robo (@deepak1556) I've fixed the things you mentioned but I couldn't understand what you said about |
| } | ||
|
|
||
| // Other arguments with value type as 'string' | ||
| else if (typeof argvValue === 'string') { |
There was a problem hiding this comment.
| else if (typeof argvValue === 'string') { | |
| // ozone platform | |
| else if (argvKey === 'ozone-platform') { | |
| if (argvValue) { | |
| app.commandLine.appendSwitch(argvKey, argvValue); | |
| app.commandLine.appendSwitch('enable-features', 'UseOzonePlatform'); | |
| } | |
| } |
|
|
ozone-platform flag will be parsed from runtime argv.json file.
2cc4453 to
4116982
Compare
|
I would love to see this one merged! |
|
Robo (@deepak1556) is there any update on this one? :) |
|
Hi Robo (@deepak1556) is there any plan to merge this PR? |
|
Hi, I would like to use this patch. Is there anything blocking the merge and can I help in some way with finalizing this patch? |
|
Can be |
| else if (argvKey === 'ozone-platform') { | ||
| if (argvValue) { | ||
| app.commandLine.appendSwitch(argvKey, argvValue); | ||
| app.commandLine.appendSwitch('enable-features', 'UseOzonePlatform'); |
There was a problem hiding this comment.
The UseOzonePlatform feature no longer needs to be explicitly enabled since a couple of Electron releases ago, so this can be safely removed.
| app.commandLine.appendSwitch('enable-features', 'UseOzonePlatform'); |
| SUPPORTED_ELECTRON_SWITCHES.push('force-renderer-accessibility'); | ||
|
|
||
| // Specify ozone platform implementation to use. | ||
| SUPPORTED_ELECTRON_SWITCHES.push('ozone-platform'); |
There was a problem hiding this comment.
Since #154092, Visual Studio Code is using an Electron version that supports the --ozone-platform-hint flag. So it may be worth enabling this flag too (ozone-platform-hint) as part of this pull-request.
There was a problem hiding this comment.
Valentin Hăloiu (@vially) unfortunately we cannot support ozone-platform-hint from application code since the flag detection happens before application code starts its execution which would be in ElectronBrowserMainParts::PreMainMessageLoopRun
|
Posting this here for visibility. I updated Electron to 19.0.10 locally to experiment with the new I'm not sure why VSCode sets it to the URL handler, as far as I can tell the URL handler works fine if it's set to the normal desktop file instead so I don't think that setting it to that is actually required for the URL handler. Ref (read the Electron dev comments as well as my own): electron/electron#34855 (comment) vscode/build/gulpfile.vscode.js Line 202 in 0ea1cfd I'm mentioning this as part of this PR because the individuals involved in this PR are clearly interested in Wayland on Linux and this will need to be resolved if Wayland is made the default (for Wayland users) or even if it's exposed as an option directly. |
|
Sorry for the delay on this, looking into the changes again ozone platform initialization happens earlier https://github.com/electron/electron/blob/main/shell/browser/electron_browser_main_parts.cc#L220-L221 before entry point JS code of VSCode can run which makes it difficult to support this flag as an application configurable argument. Users are required to continue specifying either |
|
Robo (@deepak1556) When is going to be a default solution for people running wayland? Is there any issue tracking it? edit: maybe using this? electron/electron#34937 |
wayland is quickly becoming the default on linux distros. is there a long term plan to address this? |
|
vscode is the only reason I could not use fractional scaling in office with wayland... |
enable-features and the ozone-platform flag will be parsed from the runtime argv.json file.
This PR fixes #134612