Bug 627699 - Port GTK2 to GTK3, dom patch. r=karlt

This commit is contained in:
Martin Stransky
2012-06-21 20:44:38 -04:00
parent f00a2f8a34
commit a378b97cdb
11 changed files with 66 additions and 51 deletions

View File

@@ -50,7 +50,7 @@
#include "nsIMarkupDocumentViewer.h" #include "nsIMarkupDocumentViewer.h"
#include "nsClientRect.h" #include "nsClientRect.h"
#if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK2) #if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK)
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#endif #endif
@@ -213,8 +213,8 @@ nsDOMWindowUtils::Redraw(PRUint32 aCount, PRUint32 *aDurationOut)
for (PRUint32 i = 0; i < aCount; i++) for (PRUint32 i = 0; i < aCount; i++)
rootFrame->InvalidateWithFlags(r, nsIFrame::INVALIDATE_IMMEDIATE); rootFrame->InvalidateWithFlags(r, nsIFrame::INVALIDATE_IMMEDIATE);
#if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK2) #if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK)
XSync(GDK_DISPLAY(), False); XSync(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), False);
#endif #endif
*aDurationOut = PR_IntervalToMilliseconds(PR_IntervalNow() - iStart); *aDurationOut = PR_IntervalToMilliseconds(PR_IntervalNow() - iStart);

View File

@@ -4,7 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
#include <gtk/gtk.h> #include <gtk/gtk.h>
#endif #endif
@@ -218,7 +218,7 @@ ContentChild::Init(MessageLoop* aIOLoop,
base::ProcessHandle aParentHandle, base::ProcessHandle aParentHandle,
IPC::Channel* aChannel) IPC::Channel* aChannel)
{ {
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
// sigh // sigh
gtk_init(NULL, NULL); gtk_init(NULL, NULL);
#endif #endif

View File

@@ -56,11 +56,13 @@
#endif #endif
// needed for nppdf plugin // needed for nppdf plugin
#ifdef MOZ_WIDGET_GTK2 #if (MOZ_WIDGET_GTK)
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#if (MOZ_WIDGET_GTK == 2)
#include "gtk2xtbin.h" #include "gtk2xtbin.h"
#endif #endif
#endif
#ifdef XP_OS2 #ifdef XP_OS2
#define INCL_DOS #define INCL_DOS
@@ -2013,7 +2015,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
} }
case NPNVToolkit: { case NPNVToolkit: {
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
*((NPNToolkitType*)result) = NPNVGtk2; *((NPNToolkitType*)result) = NPNVGtk2;
#endif #endif
@@ -2028,7 +2030,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
} }
case NPNVSupportsXEmbedBool: { case NPNVSupportsXEmbedBool: {
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
*(NPBool*)result = true; *(NPBool*)result = true;
#elif defined(MOZ_WIDGET_QT) #elif defined(MOZ_WIDGET_QT)
// Desktop Flash fail to initialize if browser does not support NPNVSupportsXEmbedBool // Desktop Flash fail to initialize if browser does not support NPNVSupportsXEmbedBool
@@ -2055,7 +2057,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
case NPNVSupportsWindowless: { case NPNVSupportsWindowless: {
#if defined(XP_WIN) || defined(XP_MACOSX) || \ #if defined(XP_WIN) || defined(XP_MACOSX) || \
(defined(MOZ_X11) && (defined(MOZ_WIDGET_GTK2) || defined(MOZ_WIDGET_QT))) (defined(MOZ_X11) && (defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)))
*(NPBool*)result = true; *(NPBool*)result = true;
#else #else
*(NPBool*)result = false; *(NPBool*)result = false;

View File

@@ -734,7 +734,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetNetscapeWindow(void *value)
} }
return rv; return rv;
#elif (defined(MOZ_WIDGET_GTK2) || defined(MOZ_WIDGET_QT)) && defined(MOZ_X11) #elif (defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)) && defined(MOZ_X11)
// X11 window managers want the toplevel window for WM_TRANSIENT_FOR. // X11 window managers want the toplevel window for WM_TRANSIENT_FOR.
nsIWidget* win = mObjectFrame->GetNearestWidget(); nsIWidget* win = mObjectFrame->GetNearestWidget();
if (!win) if (!win)
@@ -2432,7 +2432,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent)
nsIntPoint rootPoint(-1,-1); nsIntPoint rootPoint(-1,-1);
if (widget) if (widget)
rootPoint = anEvent.refPoint + widget->WidgetToScreenOffset(); rootPoint = anEvent.refPoint + widget->WidgetToScreenOffset();
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
Window root = GDK_ROOT_WINDOW(); Window root = GDK_ROOT_WINDOW();
#elif defined(MOZ_WIDGET_QT) #elif defined(MOZ_WIDGET_QT)
Window root = RootWindowOfScreen(DefaultScreenOfDisplay(mozilla::DefaultXDisplay())); Window root = RootWindowOfScreen(DefaultScreenOfDisplay(mozilla::DefaultXDisplay()));
@@ -2520,7 +2520,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent)
if (anEvent.pluginEvent) if (anEvent.pluginEvent)
{ {
XKeyEvent &event = pluginEvent.xkey; XKeyEvent &event = pluginEvent.xkey;
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
event.root = GDK_ROOT_WINDOW(); event.root = GDK_ROOT_WINDOW();
event.time = anEvent.time; event.time = anEvent.time;
const GdkEventKey* gdkEvent = const GdkEventKey* gdkEvent =
@@ -3046,17 +3046,11 @@ void nsPluginInstanceOwner::Paint(gfxContext* aContext,
aContext->Translate(pluginRect.TopLeft()); aContext->Translate(pluginRect.TopLeft());
Renderer renderer(window, this, pluginSize, pluginDirtyRect); Renderer renderer(window, this, pluginSize, pluginDirtyRect);
#ifdef MOZ_WIDGET_GTK2
// This is the visual used by the widgets, 24-bit if available.
GdkVisual* gdkVisual = gdk_rgb_get_visual();
Visual* visual = gdk_x11_visual_get_xvisual(gdkVisual);
Screen* screen =
gdk_x11_screen_get_xscreen(gdk_visual_get_screen(gdkVisual));
#else
Display* dpy = mozilla::DefaultXDisplay(); Display* dpy = mozilla::DefaultXDisplay();
Screen* screen = DefaultScreenOfDisplay(dpy); Screen* screen = DefaultScreenOfDisplay(dpy);
Visual* visual = DefaultVisualOfScreen(screen); Visual* visual = DefaultVisualOfScreen(screen);
#endif
renderer.Draw(aContext, nsIntSize(window->width, window->height), renderer.Draw(aContext, nsIntSize(window->width, window->height),
rendererFlags, screen, visual, nsnull); rendererFlags, screen, visual, nsnull);
} }

View File

@@ -16,6 +16,7 @@
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include "gtk2compat.h"
#include "gtk2xtbin.h" #include "gtk2xtbin.h"
class nsPluginNativeWindowGtk2 : public nsPluginNativeWindow { class nsPluginNativeWindowGtk2 : public nsPluginNativeWindow {
@@ -147,8 +148,8 @@ nsresult nsPluginNativeWindowGtk2::CallSetWindow(nsRefPtr<nsNPAPIPluginInstance>
nsresult nsPluginNativeWindowGtk2::CreateXEmbedWindow() { nsresult nsPluginNativeWindowGtk2::CreateXEmbedWindow() {
NS_ASSERTION(!mSocketWidget,"Already created a socket widget!"); NS_ASSERTION(!mSocketWidget,"Already created a socket widget!");
GdkDisplay *display = gdk_display_get_default();
GdkWindow *parent_win = gdk_window_lookup((XID)window); GdkWindow *parent_win = gdk_x11_window_lookup_for_display(display, (XID)window);
mSocketWidget = gtk_socket_new(); mSocketWidget = gtk_socket_new();
//attach the socket to the container widget //attach the socket to the container widget
@@ -179,7 +180,10 @@ nsresult nsPluginNativeWindowGtk2::CreateXEmbedWindow() {
// background and this would happen immediately (before the plug is // background and this would happen immediately (before the plug is
// created). Setting the background to None prevents the server from // created). Setting the background to None prevents the server from
// painting this window, avoiding flicker. // painting this window, avoiding flicker.
gdk_window_set_back_pixmap(mSocketWidget->window, NULL, FALSE); // TODO GTK3
#if (MOZ_WIDGET_GTK == 2)
gdk_window_set_back_pixmap(gtk_widget_get_window(mSocketWidget), NULL, FALSE);
#endif
// Resize before we show // Resize before we show
SetAllocation(); SetAllocation();
@@ -196,11 +200,17 @@ nsresult nsPluginNativeWindowGtk2::CreateXEmbedWindow() {
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
mWsInfo.display = GDK_WINDOW_XDISPLAY(gdkWindow); mWsInfo.display = GDK_WINDOW_XDISPLAY(gdkWindow);
#if (MOZ_WIDGET_GTK == 2)
mWsInfo.colormap = GDK_COLORMAP_XCOLORMAP(gdk_drawable_get_colormap(gdkWindow)); mWsInfo.colormap = GDK_COLORMAP_XCOLORMAP(gdk_drawable_get_colormap(gdkWindow));
GdkVisual* gdkVisual = gdk_drawable_get_visual(gdkWindow); GdkVisual* gdkVisual = gdk_drawable_get_visual(gdkWindow);
mWsInfo.visual = GDK_VISUAL_XVISUAL(gdkVisual);
mWsInfo.depth = gdkVisual->depth; mWsInfo.depth = gdkVisual->depth;
#else
mWsInfo.colormap = None;
GdkVisual* gdkVisual = gdk_window_get_visual(gdkWindow);
mWsInfo.depth = gdk_visual_get_depth(gdkVisual);
#endif
mWsInfo.visual = GDK_VISUAL_XVISUAL(gdkVisual);
return NS_OK; return NS_OK;
} }
@@ -223,7 +233,8 @@ nsresult nsPluginNativeWindowGtk2::CreateXtWindow() {
printf("About to create new xtbin of %i X %i from %p...\n", printf("About to create new xtbin of %i X %i from %p...\n",
width, height, (void*)window); width, height, (void*)window);
#endif #endif
GdkWindow *gdkWindow = gdk_window_lookup((XID)window); GdkDisplay *display = gdk_display_get_default();
GdkWindow *gdkWindow = gdk_x11_window_lookup_for_display(display, (XID)window);
mSocketWidget = gtk_xtbin_new(gdkWindow, 0); mSocketWidget = gtk_xtbin_new(gdkWindow, 0);
// Check to see if creating the xtbin failed for some reason. // Check to see if creating the xtbin failed for some reason.
// if it did, we can't go any further. // if it did, we can't go any further.
@@ -270,8 +281,9 @@ socket_unrealize_cb(GtkWidget *widget, gpointer data)
{ {
// Unmap and reparent any child windows that GDK does not yet know about. // Unmap and reparent any child windows that GDK does not yet know about.
// (See bug 540114 comment 10.) // (See bug 540114 comment 10.)
GdkWindow* socket_window = widget->window; GdkWindow* socket_window = gtk_widget_get_window(widget);
Display* display = GDK_DISPLAY(); GdkDisplay* gdkDisplay = gdk_display_get_default();
Display* display = GDK_DISPLAY_XDISPLAY(gdkDisplay);
// Ignore X errors that may happen if windows get destroyed (possibly // Ignore X errors that may happen if windows get destroyed (possibly
// requested by the plugin) between XQueryTree and when we operate on them. // requested by the plugin) between XQueryTree and when we operate on them.
@@ -280,13 +292,13 @@ socket_unrealize_cb(GtkWidget *widget, gpointer data)
Window root, parent; Window root, parent;
Window* children; Window* children;
unsigned int nchildren; unsigned int nchildren;
if (!XQueryTree(display, gdk_x11_drawable_get_xid(socket_window), if (!XQueryTree(display, gdk_x11_window_get_xid(socket_window),
&root, &parent, &children, &nchildren)) &root, &parent, &children, &nchildren))
return; return;
for (unsigned int i = 0; i < nchildren; ++i) { for (unsigned int i = 0; i < nchildren; ++i) {
Window child = children[i]; Window child = children[i];
if (!gdk_window_lookup(child)) { if (!gdk_x11_window_lookup_for_display(gdkDisplay, child)) {
// This window is not known to GDK. // This window is not known to GDK.
XUnmapWindow(display, child); XUnmapWindow(display, child);
XReparentWindow(display, child, DefaultRootWindow(display), 0, 0); XReparentWindow(display, child, DefaultRootWindow(display), 0, 0);

View File

@@ -44,9 +44,12 @@ using mozilla::ipc::ProcessChild;
using namespace mozilla::plugins; using namespace mozilla::plugins;
using namespace std; using namespace std;
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
#include <gtk/gtk.h> #include <gtk/gtk.h>
#if (MOZ_WIDGET_GTK == 3)
#include <gtk/gtkx.h>
#endif
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include "gtk2xtbin.h" #include "gtk2xtbin.h"

View File

@@ -36,7 +36,7 @@ extern const PRUnichar* kOOPPPluginFocusEventId;
UINT gOOPPPluginFocusEvent = UINT gOOPPPluginFocusEvent =
RegisterWindowMessage(kOOPPPluginFocusEventId); RegisterWindowMessage(kOOPPPluginFocusEventId);
extern const PRUnichar* kFlashFullscreenClass; extern const PRUnichar* kFlashFullscreenClass;
#elif defined(MOZ_WIDGET_GTK2) #elif defined(MOZ_WIDGET_GTK)
#include <gdk/gdk.h> #include <gdk/gdk.h>
#elif defined(XP_MACOSX) #elif defined(XP_MACOSX)
#include <ApplicationServices/ApplicationServices.h> #include <ApplicationServices/ApplicationServices.h>
@@ -1268,7 +1268,7 @@ PluginInstanceParent::NPP_HandleEvent(void* event)
// Release any active pointer grab so that the plugin X client can // Release any active pointer grab so that the plugin X client can
// grab the pointer if it wishes. // grab the pointer if it wishes.
Display *dpy = DefaultXDisplay(); Display *dpy = DefaultXDisplay();
# ifdef MOZ_WIDGET_GTK2 # ifdef MOZ_WIDGET_GTK
// GDK attempts to (asynchronously) track whether there is an active // GDK attempts to (asynchronously) track whether there is an active
// grab so ungrab through GDK. // grab so ungrab through GDK.
gdk_pointer_ungrab(npevent->xbutton.time); gdk_pointer_ungrab(npevent->xbutton.time);

View File

@@ -17,8 +17,12 @@
#include "mozilla/ipc/SyncChannel.h" #include "mozilla/ipc/SyncChannel.h"
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
#include <gtk/gtk.h> #include <gtk/gtk.h>
#if (MOZ_WIDGET_GTK == 3)
#include <gtk/gtkx.h>
#endif
#include "gtk2compat.h"
#endif #endif
#include "nsIFile.h" #include "nsIFile.h"
@@ -90,7 +94,7 @@ PluginModuleChild::PluginModuleChild()
, mInitializeFunc(0) , mInitializeFunc(0)
#if defined(OS_WIN) || defined(OS_MACOSX) #if defined(OS_WIN) || defined(OS_MACOSX)
, mGetEntryPointsFunc(0) , mGetEntryPointsFunc(0)
#elif defined(MOZ_WIDGET_GTK2) #elif defined(MOZ_WIDGET_GTK)
, mNestedLoopTimerId(0) , mNestedLoopTimerId(0)
#elif defined(MOZ_WIDGET_QT) #elif defined(MOZ_WIDGET_QT)
, mNestedLoopTimerObject(0) , mNestedLoopTimerObject(0)
@@ -229,7 +233,7 @@ PluginModuleChild::Init(const std::string& aPluginFilename,
return true; return true;
} }
#if defined(MOZ_WIDGET_GTK2) #if defined(MOZ_WIDGET_GTK)
typedef void (*GObjectDisposeFn)(GObject*); typedef void (*GObjectDisposeFn)(GObject*);
typedef gboolean (*GtkWidgetScrollEventFn)(GtkWidget*, GdkEventScroll*); typedef gboolean (*GtkWidgetScrollEventFn)(GtkWidget*, GdkEventScroll*);
typedef void (*GtkPlugEmbeddedFn)(GtkPlug*); typedef void (*GtkPlugEmbeddedFn)(GtkPlug*);
@@ -269,16 +273,16 @@ wrap_gtk_plug_dispose(GObject* object) {
static gboolean static gboolean
gtk_plug_scroll_event(GtkWidget *widget, GdkEventScroll *gdk_event) gtk_plug_scroll_event(GtkWidget *widget, GdkEventScroll *gdk_event)
{ {
if (!GTK_WIDGET_TOPLEVEL(widget)) // in same process as its GtkSocket if (!gtk_widget_is_toplevel(widget)) // in same process as its GtkSocket
return FALSE; // event not handled; propagate to GtkSocket return FALSE; // event not handled; propagate to GtkSocket
GdkWindow* socket_window = GTK_PLUG(widget)->socket_window; GdkWindow* socket_window = gtk_plug_get_socket_window(GTK_PLUG(widget));
if (!socket_window) if (!socket_window)
return FALSE; return FALSE;
// Propagate the event to the embedder. // Propagate the event to the embedder.
GdkScreen* screen = gdk_drawable_get_screen(socket_window); GdkScreen* screen = gdk_window_get_screen(socket_window);
GdkWindow* plug_window = widget->window; GdkWindow* plug_window = gtk_widget_get_window(widget);
GdkWindow* event_window = gdk_event->window; GdkWindow* event_window = gdk_event->window;
gint x = gdk_event->x; gint x = gdk_event->x;
gint y = gdk_event->y; gint y = gdk_event->y;
@@ -324,9 +328,9 @@ gtk_plug_scroll_event(GtkWidget *widget, GdkEventScroll *gdk_event)
memset(&xevent, 0, sizeof(xevent)); memset(&xevent, 0, sizeof(xevent));
xevent.xbutton.type = ButtonPress; xevent.xbutton.type = ButtonPress;
xevent.xbutton.window = GDK_WINDOW_XWINDOW(socket_window); xevent.xbutton.window = gdk_x11_window_get_xid(socket_window);
xevent.xbutton.root = GDK_WINDOW_XWINDOW(gdk_screen_get_root_window(screen)); xevent.xbutton.root = gdk_x11_window_get_xid(gdk_screen_get_root_window(screen));
xevent.xbutton.subwindow = GDK_WINDOW_XWINDOW(plug_window); xevent.xbutton.subwindow = gdk_x11_window_get_xid(plug_window);
xevent.xbutton.time = gdk_event->time; xevent.xbutton.time = gdk_event->time;
xevent.xbutton.x = x; xevent.xbutton.x = x;
xevent.xbutton.y = y; xevent.xbutton.y = y;
@@ -354,7 +358,7 @@ gtk_plug_scroll_event(GtkWidget *widget, GdkEventScroll *gdk_event)
static void static void
wrap_gtk_plug_embedded(GtkPlug* plug) { wrap_gtk_plug_embedded(GtkPlug* plug) {
GdkWindow* socket_window = plug->socket_window; GdkWindow* socket_window = gtk_plug_get_socket_window(plug);
if (socket_window) { if (socket_window) {
if (gtk_check_version(2,18,7) != NULL // older if (gtk_check_version(2,18,7) != NULL // older
&& g_object_get_data(G_OBJECT(socket_window), && g_object_get_data(G_OBJECT(socket_window),
@@ -497,7 +501,7 @@ PluginModuleChild::ShouldContinueFromReplyTimeout()
bool bool
PluginModuleChild::InitGraphics() PluginModuleChild::InitGraphics()
{ {
#if defined(MOZ_WIDGET_GTK2) #if defined(MOZ_WIDGET_GTK)
// Work around plugins that don't interact well with GDK // Work around plugins that don't interact well with GDK
// client-side windows. // client-side windows.
PR_SetEnv("GDK_NATIVE_WINDOWS=1"); PR_SetEnv("GDK_NATIVE_WINDOWS=1");
@@ -1072,7 +1076,7 @@ _getvalue(NPP aNPP,
switch (aVariable) { switch (aVariable) {
// Copied from nsNPAPIPlugin.cpp // Copied from nsNPAPIPlugin.cpp
case NPNVToolkit: case NPNVToolkit:
#if defined(MOZ_WIDGET_GTK2) || defined(MOZ_WIDGET_QT) #if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
*static_cast<NPNToolkitType*>(aValue) = NPNVGtk2; *static_cast<NPNToolkitType*>(aValue) = NPNVGtk2;
return NPERR_NO_ERROR; return NPERR_NO_ERROR;
#endif #endif

View File

@@ -306,7 +306,7 @@ private:
void InitQuirksModes(const nsCString& aMimeType); void InitQuirksModes(const nsCString& aMimeType);
bool InitGraphics(); bool InitGraphics();
void DeinitGraphics(); void DeinitGraphics();
#if defined(MOZ_WIDGET_GTK2) #if defined(MOZ_WIDGET_GTK)
static gboolean DetectNestedEventLoop(gpointer data); static gboolean DetectNestedEventLoop(gpointer data);
static gboolean ProcessBrowserEvents(gpointer data); static gboolean ProcessBrowserEvents(gpointer data);
@@ -340,7 +340,7 @@ private:
NPPluginFuncs mFunctions; NPPluginFuncs mFunctions;
NPSavedData mSavedData; NPSavedData mSavedData;
#if defined(MOZ_WIDGET_GTK2) #if defined(MOZ_WIDGET_GTK)
// If a plugin spins a nested glib event loop in response to a // If a plugin spins a nested glib event loop in response to a
// synchronous IPC message from the browser, the loop might break // synchronous IPC message from the browser, the loop might break
// only after the browser responds to a request sent by the // only after the browser responds to a request sent by the

View File

@@ -4,7 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
#include <glib.h> #include <glib.h>
#elif XP_MACOSX #elif XP_MACOSX
#include "PluginInterposeOSX.h" #include "PluginInterposeOSX.h"
@@ -964,7 +964,7 @@ PluginModuleParent::AnswerProcessSomeEvents()
return true; return true;
} }
#elif !defined(MOZ_WIDGET_GTK2) #elif !defined(MOZ_WIDGET_GTK)
bool bool
PluginModuleParent::AnswerProcessSomeEvents() PluginModuleParent::AnswerProcessSomeEvents()
{ {

View File

@@ -3221,7 +3221,7 @@ hangPlugin(NPObject* npobj, const NPVariant* args, uint32_t argCount,
return true; return true;
} }
#if defined(MOZ_WIDGET_GTK2) #if defined(MOZ_WIDGET_GTK)
bool bool
getClipboardText(NPObject* npobj, const NPVariant* args, uint32_t argCount, getClipboardText(NPObject* npobj, const NPVariant* args, uint32_t argCount,
NPVariant* result) NPVariant* result)