diff options
author | Karl Hallsby <karl@hallsby.com> | 2024-12-22 16:28:09 -0600 |
---|---|---|
committer | John Kehayias <john.kehayias@protonmail.com> | 2025-01-04 19:40:33 -0500 |
commit | 6ee78bb755b3cd3085c0047471bd09769a281cf1 (patch) | |
tree | 4610f8b2ede769403bc740a96a4e1c9706fc4c93 | |
parent | e3fb39c68af3f4b0cce011dd5f9f8030c9a1ab6a (diff) |
nonguix: chromium-binary-build-system: Hint Electron Ozone Platform.
This should allow Electron apps to detect whether they are running on Wayland
or X11. If they are on Wayland, then they should default to using Wayland
libraries. This should help with HiDPI monitors, fractional scaling, and all
the other issues that Wayland solved over X11.
This environment variable is only supported by Electron versions >=28. All
earlier versions relied on command-line arguments instead.
* nonguix/build/chromium-binary-build-system (install-wrapper): Add
ELECTRON_OZONE_PLATFORM_HINT environment variable and set to "auto".
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
-rw-r--r-- | nonguix/build/chromium-binary-build-system.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nonguix/build/chromium-binary-build-system.scm b/nonguix/build/chromium-binary-build-system.scm index 84297427..6d5eeb2b 100644 --- a/nonguix/build/chromium-binary-build-system.scm +++ b/nonguix/build/chromium-binary-build-system.scm @@ -52,7 +52,12 @@ (list (string-append nss "/lib/nss") output)) - ":"))))) + ":"))) + ;; Give a hint to Electron-based apps to detect if Wayland or X11 should + ;; be used. + ;; NOTE: The env-var version of this CLI arg was added in Electron >=28 + `("ELECTRON_OZONE_PLATFORM_HINT" ":" = + ("auto")))) (map (lambda (exe) (string-append bin "/" exe)) (filter |