-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
feat: add support for ELECTRON_OZONE_PLATFORM_HINT env var #39792
Conversation
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.
LGTM, pending CI pass
/cc @jkleinsc @codebytere on the CI failure. |
@vially can you please rebase? |
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.
Had a couple of nitpicks but the idea LGTM. Thanks for the patch!
4c9d8e6
to
fad1b0a
Compare
@codebytere I've rebased and addressed and @ckerr's comments. |
CI is failing with these errors, unrelated to the code in the PR:
Is this something new? We've had lots of PRs submitted from outside contributors, e.g. this one from a couple weeks ago #39597 |
@ckerr it is an underlying infrastructure issue - it’s nothing to do with forked PRs or an actual setting despite what it says (we of course have that enabled) it just needs to be rerun |
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.
This should be documented in https://github.com/electron/electron/blob/main/docs/api/environment-variables.md
fad1b0a
to
995c77e
Compare
Fixed in latest commit. |
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.
API LGTM
Release Notes Persisted
|
…9792) Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Hi, can you also add an environment variable for |
…ent variable (#607) * Remove commandline flag to enable window decorations on wayland Window decorations on wayland are enabled by default since electron v28 [1]. [1] electron/electron#39582 * Simplify logic to enable wayland ozone backend This uses the new environment variable `ELECTRON_OZONE_PLATFORM_HINT` [1], which is available since electron v28 [2]. [1] https://www.electronjs.org/docs/latest/api/environment-variables#electron_ozone_platform_hint-linux [2] electron/electron#39792 * Deprecate `SIGNAL_USE_WAYLAND` environment variable Prefer electron's new environment variable `ELECTRON_OZONE_PLATFORM_HINT` instead.
Description of Change
Note
This is a resubmit of #35614, since #35630 is still blocked on upstream/pending further discussion.
Add support for the
ELECTRON_OZONE_PLATFORM_HINT
environment variable in order to make it easier for users to enable Wayland support for all Electron apps without having to manually patch application.desktop
files (or other similar workarounds #30897).The accepted values are the same as upstream, with the special
auto
value being recommended for most users (especially for those switching between X11 and Wayland environments).When both the
--ozone-platform-hint
command line flag and theELECTRON_OZONE_PLATFORM_HINT
environment variable are specified, the command line flag has higher priority.Fixes #30897
Checklist
npm test
passesRelease Notes
Notes: Added support for
ELECTRON_OZONE_PLATFORM_HINT
environment variable on Linux.