diff --git a/dom/plugins/Makefile.in b/dom/plugins/Makefile.in index 55102b8bdf04..dbd2cf6f861b 100644 --- a/dom/plugins/Makefile.in +++ b/dom/plugins/Makefile.in @@ -123,4 +123,6 @@ endif include $(topsrcdir)/config/rules.mk +CXXFLAGS += $(TK_CFLAGS) + DEFINES += -DFORCE_PR_LOG diff --git a/dom/plugins/NPEventX11.h b/dom/plugins/NPEventX11.h index 66c7a3189429..408200783ae2 100644 --- a/dom/plugins/NPEventX11.h +++ b/dom/plugins/NPEventX11.h @@ -42,6 +42,11 @@ #if defined(MOZ_WIDGET_GTK2) # include +#elif defined(MOZ_WIDGET_QT) +// X11/X.h has #define CursorShape 0, but Qt's qnamespace.h defines +// enum CursorShape { ... }. Good times! +# undef CursorShape +# include #else # error Implement me for your toolkit #endif @@ -114,18 +119,24 @@ private: { // TODO: get Display* from Window in |ev| - // FIXME: do this using Xlib, don't use Gdk - + // FIXME: do this using Xlib +#if defined(MOZ_WIDGET_GTK2) return GDK_DISPLAY(); +#elif defined(MOZ_WIDGET_QT) + return QX11Info::display(); +#endif } static Display* GetXDisplay(const XErrorEvent& ev) { // TODO: get Display* from Window in |ev| - // FIXME: do this using Xlib, don't use Gdk - + // FIXME: do this using Xlib +#if defined(MOZ_WIDGET_GTK2) return GDK_DISPLAY(); +#elif defined(MOZ_WIDGET_QT) + return QX11Info::display(); +#endif } static void SetXDisplay(XEvent& ev) diff --git a/dom/plugins/PluginModuleChild.cpp b/dom/plugins/PluginModuleChild.cpp index 2dfb5787a695..64fdcf9b5f58 100644 --- a/dom/plugins/PluginModuleChild.cpp +++ b/dom/plugins/PluginModuleChild.cpp @@ -39,7 +39,7 @@ #include "mozilla/plugins/PluginModuleChild.h" -#ifdef OS_LINUX +#ifdef MOZ_WIDGET_GTK2 #include #endif @@ -234,7 +234,7 @@ bool PluginModuleChild::InitGraphics() { // FIXME/cjones: is this the place for this? -#if defined(OS_LINUX) +#if defined(MOZ_WIDGET_GTK2) gtk_init(0, 0); // GtkPlug is a static class so will leak anyway but this ref makes sure. diff --git a/ipc/chromium/Makefile.in b/ipc/chromium/Makefile.in index 21c78418d437..1bf4d509a0fb 100644 --- a/ipc/chromium/Makefile.in +++ b/ipc/chromium/Makefile.in @@ -246,14 +246,8 @@ CPPSRCS += \ file_util_linux.cc \ file_version_info_linux.cc \ idle_timer_none.cc \ - message_pump_glib.cc \ process_util_linux.cc \ time_posix.cc \ - chrome_paths_linux.cc \ - owned_widget_gtk.cc \ - platform_util_linux.cc \ - transport_dib_linux.cc \ - x11_util.cc \ $(NULL) endif # } OS_LINUX diff --git a/ipc/chromium/src/base/message_loop.cc b/ipc/chromium/src/base/message_loop.cc index 8a6989ba12a7..79e364f0f770 100644 --- a/ipc/chromium/src/base/message_loop.cc +++ b/ipc/chromium/src/base/message_loop.cc @@ -19,7 +19,7 @@ #if defined(OS_POSIX) #include "base/message_pump_libevent.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) && !defined(CHROMIUM_MOZILLA_BUILD) #include "base/message_pump_glib.h" #endif @@ -112,7 +112,7 @@ MessageLoop::MessageLoop(Type type) if (type_ == TYPE_UI) { #if defined(OS_MACOSX) pump_ = base::MessagePumpMac::Create(); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) && !defined(CHROMIUM_MOZILLA_BUILD) pump_ = new base::MessagePumpForUI(); #endif // OS_LINUX } else if (type_ == TYPE_IO) { diff --git a/ipc/chromium/src/chrome/common/chrome_paths.cc b/ipc/chromium/src/chrome/common/chrome_paths.cc index 11b0ac3f39fb..241430697bc0 100644 --- a/ipc/chromium/src/chrome/common/chrome_paths.cc +++ b/ipc/chromium/src/chrome/common/chrome_paths.cc @@ -32,6 +32,7 @@ bool GetGearsPluginPathFromCommandLine(FilePath* path) { } bool PathProvider(int key, FilePath* result) { +#ifndef CHROMIUM_MOZILLA_BUILD // Some keys are just aliases... switch (key) { case chrome::DIR_APP: @@ -211,6 +212,7 @@ bool PathProvider(int key, FilePath* result) { return false; *result = cur; +#endif return true; } diff --git a/ipc/ipdl/Makefile.in b/ipc/ipdl/Makefile.in index fbb7ab3c15b4..f1d8397d299b 100644 --- a/ipc/ipdl/Makefile.in +++ b/ipc/ipdl/Makefile.in @@ -100,3 +100,7 @@ export:: $(ALL_IPDLSRCS) --outcpp-dir=. \ $(IPDLDIRS:%=-I$(topsrcdir)/%) \ $^ + +# We #include some things in the dom/plugins/ directory that rely on +# toolkit libraries. +CXXFLAGS += $(TK_CFLAGS) diff --git a/layout/build/Makefile.in b/layout/build/Makefile.in index 27324643fc63..19d5acab43e9 100644 --- a/layout/build/Makefile.in +++ b/layout/build/Makefile.in @@ -211,15 +211,10 @@ EXTRA_DSO_LDOPTS = \ $(MOZ_JS_LIBS) \ $(NULL) -ifdef MOZ_ENABLE_GTK2 -EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS) \ - -lXrender \ - $(NULL) -endif +EXTRA_DSO_LDOPTS += $(TK_LIBS) -ifdef MOZ_ENABLE_QT -EXTRA_DSO_LDOPTS += $(MOZ_QT_LIBS) \ - $(NULL) +ifdef MOZ_ENABLE_GTK2 +EXTRA_DSO_LDOPTS += -lXrender endif ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) diff --git a/modules/plugin/base/src/Makefile.in b/modules/plugin/base/src/Makefile.in index 7eece9eb7651..26e5c57904c0 100644 --- a/modules/plugin/base/src/Makefile.in +++ b/modules/plugin/base/src/Makefile.in @@ -125,8 +125,14 @@ DEFINES += -DGENERIC_MOTIF_REDEFINES OS_CXXFLAGS += -Wc,warn=disa=NOSIMPINT endif +CXXFLAGS += $(TK_CFLAGS) +EXTRA_DSO_LDOPTS += $(TK_LIBS) + ifdef MOZ_ENABLE_GTK2 -CXXFLAGS += $(MOZ_GTK2_CFLAGS) -CFLAGS += $(MOZ_GTK2_CFLAGS) -EXTRA_DSO_LDOPTS += -lgtkxtbin $(XLDFLAGS) $(XT_LIBS) $(MOZ_GTK2_LIBS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) +EXTRA_DSO_LDOPTS += -lgtkxtbin $(XLDFLAGS) $(XT_LIBS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) endif #MOZ_ENABLE_GTK2 + +ifeq ($(MOZ_WIDGET_TOOLKIT),qt) +EXTRA_DSO_LDOPTS += $(XEXT_LIBS) $(XCOMPOSITE_LIBS) +endif +