mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00

Inversed logic has been proven to be more difficult to read, so use the simple positive variant. Also add a simple sanity check for `WAYLAND_DISPLAY` so if people set `MOZ_ENABLE_WAYLAND` in a X11 session don't get undesired behavior. While on it, change a check for `XDG_SESSION_TYPE` to also use `WAYLAND_DISPLAY`, improving behavior when launching FF from a TTY or a TTY-launched session (e.g. via `weston-launch`). `WAYLAND_DISPLAY` and `DISPLAY` are not expected to be set if no Wayland or X11 server is available, so using them makes us behave more predictable. Differential Revision: https://phabricator.services.mozilla.com/D106726