summaryrefslogtreecommitdiff
path: root/mozilla-1522780.patch
blob: 809a59845b9ea32e0fcafe81c092f63d5845d11f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff -up firefox-65.0/toolkit/xre/nsAppRunner.cpp.1522780 firefox-65.0/toolkit/xre/nsAppRunner.cpp
--- firefox-65.0/toolkit/xre/nsAppRunner.cpp.1522780	2019-02-04 14:27:16.704591496 +0100
+++ firefox-65.0/toolkit/xre/nsAppRunner.cpp	2019-02-04 14:30:01.869913509 +0100
@@ -3839,12 +3839,14 @@ int XREMain::XRE_mainStartup(bool* aExit
 
     bool disableWayland = true;
 #if defined(MOZ_WAYLAND)
-    // Make X11 backend the default one.
-    // Enable Wayland backend only when GDK_BACKEND is set and
-    // Gtk+ >= 3.22 where we can expect recent enough
-    // compositor & libwayland interface.
-    disableWayland = (PR_GetEnv("GDK_BACKEND") == nullptr) ||
-                     (gtk_check_version(3, 22, 0) != nullptr);
+    // Enable Wayland on Gtk+ >= 3.22 where we can expect recent enough
+    disableWayland = (gtk_check_version(3, 22, 0) != nullptr);
+    if (!disableWayland) {
+      // Make X11 backend the default one unless MOZ_ENABLE_WAYLAND or
+      // GDK_BACKEND are specified.
+      disableWayland = (PR_GetEnv("GDK_BACKEND") == nullptr) &&
+                       (PR_GetEnv("MOZ_ENABLE_WAYLAND") == nullptr);
+    }
 #endif
     // On Wayland disabled builds read X11 DISPLAY env exclusively
     // and don't care about different displays.
bgstack15