summaryrefslogtreecommitdiff
path: root/mozilla-1415078.patch
blob: c5c433eab59cda25e84119e88ce27de9b9bfd3cb (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
diff --git a/toolkit/components/remote/nsRemoteService.cpp b/toolkit/components/remote/nsRemoteService.cpp
--- a/toolkit/components/remote/nsRemoteService.cpp
+++ b/toolkit/components/remote/nsRemoteService.cpp
@@ -34,20 +34,18 @@
 NS_IMETHODIMP
 nsRemoteService::Startup(const char* aAppName, const char* aProfileName)
 {
-#if defined(MOZ_ENABLE_DBUS)
+#if defined(MOZ_ENABLE_DBUS) && defined(MOZ_WAYLAND)
     nsresult rv;
     mDBusRemoteService = new nsDBusRemoteService();
     rv = mDBusRemoteService->Startup(aAppName, aProfileName);
     if (NS_FAILED(rv)) {
         mDBusRemoteService = nullptr;
     }
+#elif !defined(MOZ_WAYLAND)
+    mGtkRemoteService = new nsGTKRemoteService();
+    mGtkRemoteService->Startup(aAppName, aProfileName);
 #endif
 
-    if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
-        mGtkRemoteService = new nsGTKRemoteService();
-        mGtkRemoteService->Startup(aAppName, aProfileName);
-    }
-
     if (!mDBusRemoteService && !mGtkRemoteService)
         return NS_ERROR_FAILURE;
 
@@ -73,7 +71,7 @@
 NS_IMETHODIMP
 nsRemoteService::Shutdown()
 {
-#if defined(MOZ_ENABLE_DBUS)
+#if defined(MOZ_ENABLE_DBUS) && defined(MOZ_WAYLAND)
     if (mDBusRemoteService) {
         mDBusRemoteService->Shutdown();
         mDBusRemoteService = nullptr;
diff --git a/widget/xremoteclient/moz.build b/widget/xremoteclient/moz.build
--- a/widget/xremoteclient/moz.build
+++ b/widget/xremoteclient/moz.build
@@ -11,7 +11,6 @@
 
 SOURCES += [
     'RemoteUtils.cpp',
-    'XRemoteClient.cpp',
 ]
 
 if CONFIG['MOZ_ENABLE_DBUS'] and CONFIG['MOZ_WAYLAND']:
@@ -20,3 +19,7 @@
     ]
     CXXFLAGS += CONFIG['TK_CFLAGS']
     CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
+else:
+    SOURCES += [
+        'XRemoteClient.cpp',
+    ]

bgstack15