diff --git a/toolkit/components/moz.build b/toolkit/components/moz.build index e43f0a8786a7..ca8c1b408055 100644 --- a/toolkit/components/moz.build +++ b/toolkit/components/moz.build @@ -8,7 +8,7 @@ with Files('**'): BUG_COMPONENT = ('Toolkit', 'General') # These component dirs are built for all apps (including suite) -if CONFIG['MOZ_ENABLE_XREMOTE']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: DIRS += ['remote'] DIRS += [ diff --git a/toolkit/moz.configure b/toolkit/moz.configure index ff54b8e4966c..06529077cfdd 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -203,8 +203,6 @@ def toolkit_define(toolkit): set_define(toolkit_define, True) -set_config('MOZ_ENABLE_XREMOTE', True, when=toolkit_gtk) -set_define('MOZ_ENABLE_XREMOTE', True, when=toolkit_gtk) set_config('MOZ_X11', True, when=toolkit_gtk) set_define('MOZ_X11', True, when=toolkit_gtk) add_old_configure_assignment('MOZ_X11', True, when=toolkit_gtk) diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild index 4a0e5f17271f..e90ca1d3b799 100644 --- a/toolkit/toolkit.mozbuild +++ b/toolkit/toolkit.mozbuild @@ -133,9 +133,6 @@ DIRS += [ '/tools/profiler', ] -if CONFIG['MOZ_ENABLE_XREMOTE']: - DIRS += ['/widget/xremoteclient'] - if CONFIG['MOZ_SPELLCHECK']: DIRS += ['/extensions/spellcheck'] @@ -157,7 +154,10 @@ DIRS += [ ] if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: - DIRS += ['/toolkit/system/gnome'] + DIRS += [ + '/toolkit/system/gnome', + '/widget/xremoteclient', + ] if CONFIG['ENABLE_MARIONETTE']: DIRS += [ diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build index e5828145fc4b..0de7e3484c6c 100644 --- a/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build @@ -211,17 +211,15 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': '/widget/cocoa', ] -if CONFIG['MOZ_ENABLE_XREMOTE']: - LOCAL_INCLUDES += [ - '/widget/xremoteclient', - ] - CXXFLAGS += CONFIG['TK_CFLAGS'] CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS'] CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS'] if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS'] + LOCAL_INCLUDES += [ + '/widget/xremoteclient', + ] DEFINES['TOPOBJDIR'] = TOPOBJDIR FINAL_TARGET_PP_FILES += [ diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index ea1fda5a259f..710d57915f9d 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -180,7 +180,7 @@ #endif // for X remote support -#ifdef MOZ_ENABLE_XREMOTE +#if defined(MOZ_WIDGET_GTK) #include "XRemoteClient.h" #include "nsIRemoteService.h" #include "nsProfileLock.h" @@ -1659,7 +1659,7 @@ DumpVersion() printf("\n"); } -#ifdef MOZ_ENABLE_XREMOTE +#if defined(MOZ_WIDGET_GTK) static RemoteResult ParseRemoteCommandLine(nsCString& program, const char** profile, @@ -1729,7 +1729,7 @@ StartRemoteClient(const char* aDesktopStartupID, return REMOTE_FOUND; } -#endif // MOZ_ENABLE_XREMOTE +#endif // MOZ_WIDGET_GTK void XRE_InitOmnijar(nsIFile* greOmni, nsIFile* appOmni) @@ -3019,10 +3019,8 @@ public: XREMain() : mStartOffline(false) , mShuttingDown(false) -#ifdef MOZ_ENABLE_XREMOTE - , mDisableRemote(false) -#endif #if defined(MOZ_WIDGET_GTK) + , mDisableRemote(false) , mGdkDisplay(nullptr) #endif {}; @@ -3044,7 +3042,7 @@ public: nsCOMPtr mProfD; nsCOMPtr mProfLD; nsCOMPtr mProfileLock; -#ifdef MOZ_ENABLE_XREMOTE +#if defined(MOZ_WIDGET_GTK) nsCOMPtr mRemoteService; nsProfileLock mRemoteLock; nsCOMPtr mRemoteLockDir; @@ -3059,7 +3057,7 @@ public: bool mStartOffline; bool mShuttingDown; -#ifdef MOZ_ENABLE_XREMOTE +#if defined(MOZ_WIDGET_GTK) bool mDisableRemote; #endif @@ -3911,7 +3909,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag) HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0); #endif /* XP_WIN */ -#if defined(MOZ_WIDGET_GTK) || defined(MOZ_ENABLE_XREMOTE) +#if defined(MOZ_WIDGET_GTK) // Stash DESKTOP_STARTUP_ID in malloc'ed memory because gtk_init will clear it. #define HAVE_DESKTOP_STARTUP_ID const char* desktopStartupIDEnv = PR_GetEnv("DESKTOP_STARTUP_ID"); @@ -4041,7 +4039,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag) mDisableRemote = true; } #endif -#ifdef MOZ_ENABLE_XREMOTE +#if defined(MOZ_WIDGET_GTK) // handle --remote now that xpcom is fired up bool newInstance; { @@ -4724,7 +4722,7 @@ XREMain::XRE_mainRun() } if (!mShuttingDown) { -#ifdef MOZ_ENABLE_XREMOTE +#if defined(MOZ_WIDGET_GTK) // if we have X remote support, start listening for requests on the // proxy window. if (!mDisableRemote) @@ -4736,7 +4734,7 @@ XREMain::XRE_mainRun() mRemoteLock.Cleanup(); mRemoteLockDir->Remove(false); } -#endif /* MOZ_ENABLE_XREMOTE */ +#endif /* MOZ_WIDGET_GTK */ mNativeApp->Enable(); } @@ -4941,12 +4939,12 @@ XREMain::XRE_main(int argc, char* argv[], const BootstrapConfig& aConfig) } if (!mShuttingDown) { -#ifdef MOZ_ENABLE_XREMOTE +#if defined(MOZ_WIDGET_GTK) // shut down the x remote proxy window if (mRemoteService) { mRemoteService->Shutdown(); } -#endif /* MOZ_ENABLE_XREMOTE */ +#endif /* MOZ_WIDGET_GTK */ } mScopedXPCOM = nullptr;