зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1720497 - Do not require MOZ_ENABLE_WAYLAND if Xwayland is not available, r=stransky
If `WAYLAND_DISPLAY` is set but `DISPLAY` is not, we have every reason to assume that we are in a Wayland-only session. Enable the Wayland backend unconditionally in this case. Note: We do not bother to further sanity check the content of the env variables as these can be considered client setup bugs. Differential Revision: https://phabricator.services.mozilla.com/D120216
This commit is contained in:
Родитель
a3a8d74a08
Коммит
68d9686d94
|
@ -4081,9 +4081,10 @@ bool IsWaylandEnabled() {
|
|||
return false;
|
||||
}
|
||||
|
||||
const char* x11Display = PR_GetEnv("DISPLAY");
|
||||
// MOZ_ENABLE_WAYLAND is our primary Wayland on/off switch.
|
||||
const char* waylandPref = PR_GetEnv("MOZ_ENABLE_WAYLAND");
|
||||
bool enableWayland = (waylandPref && *waylandPref);
|
||||
bool enableWayland = !x11Display || (waylandPref && *waylandPref);
|
||||
if (!enableWayland) {
|
||||
const char* backendPref = PR_GetEnv("GDK_BACKEND");
|
||||
enableWayland = (backendPref && strncmp(backendPref, "wayland", 7) == 0);
|
||||
|
|
Загрузка…
Ссылка в новой задаче