mozilla-bmo1724679.patch
branchfirefox91
changeset 1167 7852ceef239b
equal deleted inserted replaced
1162:af5e283c2e5d 1167:7852ceef239b
       
     1 diff --git a/toolkit/components/remote/nsRemoteService.cpp b/toolkit/components/remote/nsRemoteService.cpp
       
     2 --- a/toolkit/components/remote/nsRemoteService.cpp
       
     3 +++ b/toolkit/components/remote/nsRemoteService.cpp
       
     4 @@ -107,7 +107,8 @@
       
     5    bool useX11Remote = mozilla::widget::GdkIsX11Display();
       
     6  
       
     7  #  if defined(MOZ_ENABLE_DBUS)
       
     8 -  if (!useX11Remote || getenv(DBUS_REMOTE_ENV)) {
       
     9 +  const char* dbusRemoteEnv = getenv(DBUS_REMOTE_ENV);
       
    10 +  if (!useX11Remote || (dbusRemoteEnv && *dbusRemoteEnv == '1')) {
       
    11      client = MakeUnique<nsDBusRemoteClient>();
       
    12    }
       
    13  #  endif
       
    14 diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
       
    15 --- a/toolkit/xre/nsAppRunner.cpp
       
    16 +++ b/toolkit/xre/nsAppRunner.cpp
       
    17 @@ -4125,7 +4125,7 @@
       
    18    const char* x11Display = PR_GetEnv("DISPLAY");
       
    19    // MOZ_ENABLE_WAYLAND is our primary Wayland on/off switch.
       
    20    const char* waylandPref = PR_GetEnv("MOZ_ENABLE_WAYLAND");
       
    21 -  bool enableWayland = !x11Display || (waylandPref && *waylandPref);
       
    22 +  bool enableWayland = !x11Display || (waylandPref && *waylandPref == '1');
       
    23    if (!enableWayland) {
       
    24      const char* backendPref = PR_GetEnv("GDK_BACKEND");
       
    25      enableWayland = (backendPref && strncmp(backendPref, "wayland", 7) == 0);
       
    26 diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp
       
    27 --- a/widget/gtk/nsFilePicker.cpp
       
    28 +++ b/widget/gtk/nsFilePicker.cpp
       
    29 @@ -616,7 +616,7 @@
       
    30    if (mUseNativeFileChooser && sGtkNativeDialogShowPtr != nullptr) {
       
    31      const char* portalEnvString = g_getenv("GTK_USE_PORTAL");
       
    32      bool setPortalEnv =
       
    33 -        (portalEnvString && atoi(portalEnvString) == 0) || !portalEnvString;
       
    34 +        (portalEnvString && *portalEnvString == '0') || !portalEnvString;
       
    35      if (setPortalEnv) {
       
    36        setenv("GTK_USE_PORTAL", "1", true);
       
    37      }
       
    38 diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
       
    39 --- a/widget/gtk/nsWindow.cpp
       
    40 +++ b/widget/gtk/nsWindow.cpp
       
    41 @@ -8835,7 +8835,7 @@
       
    42    // decorations does not work with CSD.
       
    43    // We check GTK_CSD as well as gtk_window_should_use_csd() does.
       
    44    const char* csdOverride = getenv("GTK_CSD");
       
    45 -  if (csdOverride && atoi(csdOverride)) {
       
    46 +  if (csdOverride && *csdOverride == '1') {
       
    47      sGtkWindowDecoration = GTK_DECORATION_CLIENT;
       
    48      return sGtkWindowDecoration;
       
    49    }
       
    50 
       
    51