pmaports/main/postmarketos-base-ui/rootfs-etc-tinydm.d-env-wayland.d-50-firefox-wayland.sh
Newbyte 6d25d7f617
main/postmarketos-base: add Firefox env config to -tinydm subpackage (MR 2235)
Currently, this only sets Firefox to run in Wayland mode, but in the
future it might be used to make e.g. SDL applications run in Wayland
mode.

SDL applications are not set to run in Wayland mode right no as
SDL 1.2 uses the same environment variable as SDL 2.0 for
controlling video driver (SDL_VIDEODRIVER) and SDL 1.2 does not
support Wayland and crashes if an invalid value is provided for
SDL_VIDEODRIVER, and as such setting SDL_VIDEODRIVER=wayland
globally would break all SDL 1.2 applications. This will however be
fixed once SDL 1.2 is replaced by sdl12-compat in Alpine, as
sdl12-compat implements the SDL 1.2 API and ABI via SDL 2.0 and as
such supports Wayland. As such, once this happens we can start
setting SDL_VIDEODRIVER=wayland.

[ci:skip-build] already built successfully in CI
2021-06-30 23:38:12 -07:00

6 lines
247 B
Bash

#!/bin/sh
# Firefox does not enable Wayland by default on Phosh, so we need to force it.
# GDK_BACKEND=wayland is not used as it causes issues (chiefly, makes
# gsd-xsettings crash) and is not necessary with GTK apps.
export MOZ_ENABLE_WAYLAND=1