зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1724679 [Linux] Check env variables for '1' to enable them, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D122076
This commit is contained in:
Родитель
423dd4a3bd
Коммит
49f523cc07
|
@ -107,7 +107,8 @@ RemoteResult nsRemoteService::StartClient(const char* aDesktopStartupID) {
|
|||
bool useX11Remote = mozilla::widget::GdkIsX11Display();
|
||||
|
||||
# if defined(MOZ_ENABLE_DBUS)
|
||||
if (!useX11Remote || getenv(DBUS_REMOTE_ENV)) {
|
||||
const char* dbusRemoteEnv = getenv(DBUS_REMOTE_ENV);
|
||||
if (!useX11Remote || (dbusRemoteEnv && *dbusRemoteEnv == '1')) {
|
||||
client = MakeUnique<nsDBusRemoteClient>();
|
||||
}
|
||||
# endif
|
||||
|
|
|
@ -4125,7 +4125,7 @@ bool IsWaylandEnabled() {
|
|||
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 = !x11Display || (waylandPref && *waylandPref);
|
||||
bool enableWayland = !x11Display || (waylandPref && *waylandPref == '1');
|
||||
if (!enableWayland) {
|
||||
const char* backendPref = PR_GetEnv("GDK_BACKEND");
|
||||
enableWayland = (backendPref && strncmp(backendPref, "wayland", 7) == 0);
|
||||
|
|
|
@ -616,7 +616,7 @@ void nsFilePicker::GtkFileChooserShow(void* file_chooser) {
|
|||
if (mUseNativeFileChooser && sGtkNativeDialogShowPtr != nullptr) {
|
||||
const char* portalEnvString = g_getenv("GTK_USE_PORTAL");
|
||||
bool setPortalEnv =
|
||||
(portalEnvString && atoi(portalEnvString) == 0) || !portalEnvString;
|
||||
(portalEnvString && *portalEnvString == '0') || !portalEnvString;
|
||||
if (setPortalEnv) {
|
||||
setenv("GTK_USE_PORTAL", "1", true);
|
||||
}
|
||||
|
|
|
@ -8835,7 +8835,7 @@ nsWindow::GtkWindowDecoration nsWindow::GetSystemGtkWindowDecoration() {
|
|||
// decorations does not work with CSD.
|
||||
// We check GTK_CSD as well as gtk_window_should_use_csd() does.
|
||||
const char* csdOverride = getenv("GTK_CSD");
|
||||
if (csdOverride && atoi(csdOverride)) {
|
||||
if (csdOverride && *csdOverride == '1') {
|
||||
sGtkWindowDecoration = GTK_DECORATION_CLIENT;
|
||||
return sGtkWindowDecoration;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче