2
0
mirror of https://codeberg.org/kiss-community/repo synced 2025-01-05 01:10:07 -07:00
repo/extra/firefox/patches/no-dbus.patch
2024-11-25 20:49:15 -06:00

55 lines
1.8 KiB
Diff

diff --git a/toolkit/components/remote/moz.build b/toolkit/components/remote/moz.build
index 4ac1408..0e84246 100644
--- a/toolkit/components/remote/moz.build
+++ b/toolkit/components/remote/moz.build
@@ -26,7 +26,7 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
"RemoteUtils.h",
]
CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"]
- else:
+ elif CONFIG["MOZ_X11"]:
SOURCES += [
"nsGTKRemoteServer.cpp",
"nsXRemoteClient.cpp",
diff --git a/toolkit/components/remote/nsRemoteService.cpp b/toolkit/components/remote/nsRemoteService.cpp
index 46860f6..66ba453 100644
--- a/toolkit/components/remote/nsRemoteService.cpp
+++ b/toolkit/components/remote/nsRemoteService.cpp
@@ -7,10 +7,10 @@
#include "nsRemoteClient.h"
#ifdef MOZ_WIDGET_GTK
-# ifdef MOZ_ENABLE_DBUS
+# if defined(MOZ_ENABLE_DBUS)
# include "nsDBusRemoteServer.h"
# include "nsDBusRemoteClient.h"
-# else
+# elif defined(MOZ_X11)
# include "nsGTKRemoteServer.h"
# include "nsXRemoteClient.h"
# endif
@@ -198,8 +198,10 @@ nsresult nsRemoteService::SendCommandLine(const nsACString& aProfile,
#ifdef MOZ_WIDGET_GTK
# if defined(MOZ_ENABLE_DBUS)
client = MakeUnique<nsDBusRemoteClient>(mStartupToken);
-# else
+# elif defined(MOZ_X11)
client = MakeUnique<nsXRemoteClient>(mStartupToken);
+# else
+ return NS_ERROR_NOT_AVAILABLE;
# endif
#elif defined(XP_WIN)
client = MakeUnique<nsWinRemoteClient>();
@@ -260,8 +262,10 @@ void nsRemoteService::StartupServer() {
#ifdef MOZ_WIDGET_GTK
# if defined(MOZ_ENABLE_DBUS)
mRemoteServer = MakeUnique<nsDBusRemoteServer>();
-# else
+# elif defined(MOZ_X11)
mRemoteServer = MakeUnique<nsGTKRemoteServer>();
+# else
+ return;
# endif
#elif defined(XP_WIN)
mRemoteServer = MakeUnique<nsWinRemoteServer>();