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
fix: add support for --ozone-platform-hint flag on Linux #34937
Conversation
a0e92ce
to
ab3cc3a
Compare
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.
Can you copy the logic to support this flag into ElectronBrowserMainParts
int ElectronBrowserMainParts::PreEarlyInitialization() { |
Electron has its own shutdown logic and bringing in ChromeBrowserMainExtraParts
overrides this, also it is not necessary to support this flag.
ab3cc3a
to
7807684
Compare
@deepak1556 I've copied the logic from However, it is a bit verbose so it may be worth moving it someplace else in order to keep |
7807684
to
1a16523
Compare
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.
Thanks!
Release Notes Persisted
|
I have automatically backported this PR to "18-x-y", please check out #35013 |
I have automatically backported this PR to "20-x-y", please check out #35014 |
I have automatically backported this PR to "19-x-y", please check out #35015 |
Description of Change
Add support for the
--ozone-platform-hint
flag in order to make it easier for users to switch between the X11 and Wayland platforms (e.g.: by using--ozone-platform-hint=auto
).Implementation details
This was implemented by reusing the same logic from upstream, but it required implementingchrome::SessionEnding()
which is a bit hacky. This was necessary due to this call fromChromeBrowserMainExtraPartsOzone::PostCreateMainMessageLoop()
.Another option would have been to either patch that method or copy the logic fromChromeBrowserMainExtraPartsOzone
andChromeBrowserMainExtraPartsLinux
inside Electron. If Electron maintainers think that's a more reasonable approach I'll update this pull-request accordingly.EDIT: This description is no longer relevant because the implementation has been reworked with feedback from Electron maintainers.
Fixes #33810
Checklist
npm test
passesRelease Notes
Notes: Added support for
--ozone-platform-hint
flag on Linux