firefox/mozilla-1415078.patch

58 lines
1.7 KiB
Diff

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',
+ ]