mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 914607 - Remove MOZ_WIDGET_GTK2. r=karlt
This commit is contained in:
parent
4e6c8564ed
commit
158c3250f0
@ -912,7 +912,7 @@ var gBrowserInit = {
|
||||
defaultHeight = screen.availHeight * .75;
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#if MOZ_WIDGET_GTK == 2
|
||||
// On X, we're not currently able to account for the size of the window
|
||||
// border. Use 28px as a guess (titlebar + bottom window border)
|
||||
defaultHeight -= 28;
|
||||
|
@ -66,7 +66,7 @@ const PREF_AUDIO_FEED_SELECTED_READER = "browser.audioFeeds.handler.default";
|
||||
const kActionUsePlugin = 5;
|
||||
|
||||
/*
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#if MOZ_WIDGET_GTK == 2
|
||||
*/
|
||||
const ICON_URL_APP = "moz-icon://dummy.exe?size=16";
|
||||
/*
|
||||
|
@ -1922,7 +1922,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
}
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
// adobe nppdf calls XtGetApplicationNameAndClass(display,
|
||||
// &instance, &class) we have to init Xt toolkit before get
|
||||
// XtDisplay just call gtk_xtbin_new(w,0) once
|
||||
@ -1943,7 +1943,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
|
||||
return NPERR_GENERIC_ERROR;
|
||||
#endif
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_OS2) || defined(MOZ_WIDGET_GTK2) \
|
||||
#if defined(XP_WIN) || defined(XP_OS2) || (MOZ_WIDGET_GTK == 2) \
|
||||
|| defined(MOZ_WIDGET_QT)
|
||||
case NPNVnetscapeWindow: {
|
||||
if (!npp || !npp->ndata)
|
||||
|
@ -557,7 +557,7 @@ nsresult nsNPAPIPluginInstance::SetWindow(NPWindow* window)
|
||||
if (!window || RUNNING != mRunning)
|
||||
return NS_OK;
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
// bug 108347, flash plugin on linux doesn't like window->width <=
|
||||
// 0, but Java needs wants this call.
|
||||
if (!nsPluginHost::IsJavaMIMEType(mMIMEType) && window->type == NPWindowTypeWindow &&
|
||||
|
@ -75,7 +75,7 @@ static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
|
||||
#include "nsPluginUtilsOSX.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
@ -737,7 +737,7 @@ nsresult nsPluginStreamListenerPeer::ServeStreamAsFile(nsIRequest *request,
|
||||
if (owner) {
|
||||
NPWindow* window = nullptr;
|
||||
owner->GetWindow(window);
|
||||
#if defined(MOZ_WIDGET_GTK2) || defined(MOZ_WIDGET_QT)
|
||||
#if (MOZ_WIDGET_GTK == 2) || defined(MOZ_WIDGET_QT)
|
||||
// Should call GetPluginPort() here.
|
||||
// This part is copied from nsPluginInstanceOwner::GetPluginPort().
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
|
@ -39,7 +39,7 @@
|
||||
#define DEFAULT_X11_PATH ""
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
|
||||
#define PLUGIN_MAX_LEN_OF_TMP_ARR 512
|
||||
|
||||
@ -265,7 +265,7 @@ nsresult nsPluginFile::LoadPlugin(PRLibrary **outLibrary)
|
||||
|
||||
libSpec.value.pathname = path.get();
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
|
||||
// Normally, Mozilla isn't linked against libXt and libXext
|
||||
// since it's a Gtk/Gdk application. On the other hand,
|
||||
|
@ -1101,7 +1101,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow)
|
||||
CreateWindow(aWindow);
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
if (mXEmbed && gtk_check_version(2,18,7) != NULL) { // older
|
||||
if (aWindow.type == NPWindowTypeWindow) {
|
||||
GdkWindow* socket_window = gdk_window_lookup(static_cast<GdkNativeWindow>(aWindow.window));
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#include "gfxPlatformGtk.h"
|
||||
#define gfxToolkitPlatform gfxPlatformGtk
|
||||
#elif defined(MOZ_WIDGET_QT)
|
||||
|
@ -38,7 +38,7 @@ static const mozilla::Module::CategoryEntry kIconCategories[] = {
|
||||
static void
|
||||
IconDecoderModuleDtor()
|
||||
{
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
nsIconChannel::Shutdown();
|
||||
#endif
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ nsMenuBarFrame::ToggleMenuActiveState()
|
||||
// Activate the menu bar
|
||||
SetActive(true);
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
firstFrame->OpenMenu(true);
|
||||
#else
|
||||
firstFrame->SelectMenu(true);
|
||||
|
@ -4166,7 +4166,7 @@ pref("gfx.apitrace.enabled",false);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_X11
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
pref("gfx.xrender.enabled",true);
|
||||
#endif
|
||||
#endif
|
||||
|
@ -61,7 +61,7 @@ int main(int argc, char** argv)
|
||||
gdk_init(&argc, &argv);
|
||||
|
||||
// TODO GTK3
|
||||
#if defined(HAVE_LIBXSS) && defined(MOZ_WIDGET_GTK2)
|
||||
#if defined(HAVE_LIBXSS) && (MOZ_WIDGET_GTK == 2)
|
||||
int event_base, error_base;
|
||||
Bool have_xscreensaver =
|
||||
XScreenSaverQueryExtension(GDK_DISPLAY(), &event_base, &error_base);
|
||||
@ -129,7 +129,7 @@ int main(int argc, char** argv)
|
||||
GdkWindow* window = gdk_get_default_root_window();
|
||||
GdkPixbuf* screenshot = NULL;
|
||||
// TODO GTK3
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
screenshot = gdk_pixbuf_get_from_drawable(NULL, window, NULL,
|
||||
0, 0, 0, 0,
|
||||
gdk_screen_width(),
|
||||
|
@ -58,7 +58,7 @@ X11Error(Display *display, XErrorEvent *event) {
|
||||
}
|
||||
XCloseDisplay(tmpDisplay);
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
// GDK2 calls XCloseDevice the devices that it opened on startup, but
|
||||
// the XI protocol no longer ensures that the devices will still exist.
|
||||
// If they have been removed, then a BadDevice error results. Ignore
|
||||
|
@ -209,7 +209,7 @@ gint moz_gtk_enable_style_props(style_prop_t styleGetProp);
|
||||
*/
|
||||
gint moz_gtk_shutdown();
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
/**
|
||||
* Retrieves the colormap to use for drawables passed to moz_gtk_widget_paint.
|
||||
*/
|
||||
@ -217,7 +217,7 @@ GdkColormap* moz_gtk_widget_get_colormap();
|
||||
#endif
|
||||
|
||||
/*** Widget drawing ***/
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
/**
|
||||
* Paint a widget in the current theme.
|
||||
* widget: a constant giving the widget to paint
|
||||
|
@ -236,14 +236,14 @@ moz_container_realize (GtkWidget *widget)
|
||||
attributes.visual = gtk_widget_get_visual (widget);
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
attributes.colormap = gtk_widget_get_colormap (widget);
|
||||
attributes_mask |= GDK_WA_COLORMAP;
|
||||
#endif
|
||||
|
||||
window = gdk_window_new (parent, &attributes, attributes_mask);
|
||||
gdk_window_set_user_data (window, widget);
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
/* TODO GTK3? */
|
||||
/* set the back pixmap to None so that you don't end up with the gtk
|
||||
default which is BlackPixel */
|
||||
@ -256,7 +256,7 @@ moz_container_realize (GtkWidget *widget)
|
||||
|
||||
gtk_widget_set_window (widget, window);
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
widget->style = gtk_style_attach (widget->style, widget->window);
|
||||
#endif
|
||||
}
|
||||
|
@ -630,7 +630,7 @@ nsNativeThemeGTK::GetGtkWidgetAndState(uint8_t aWidgetType, nsIFrame* aFrame,
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
class ThemeRenderer : public gfxGdkNativeRenderer {
|
||||
public:
|
||||
ThemeRenderer(GtkWidgetState aState, GtkThemeWidgetType aGTKWidgetType,
|
||||
@ -822,7 +822,7 @@ nsNativeThemeGTK::DrawWidgetBackground(nsRenderingContext* aContext,
|
||||
gdk_error_trap_push ();
|
||||
}
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
// The gdk_clip is just advisory here, meaning "you don't
|
||||
// need to draw outside this rect if you don't feel like it!"
|
||||
GdkRectangle gdk_clip = {0, 0, drawingRect.width, drawingRect.height};
|
||||
|
@ -44,7 +44,7 @@
|
||||
#endif
|
||||
#endif /* MOZ_X11 */
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#include <gtk/gtkprivate.h>
|
||||
#endif
|
||||
|
||||
@ -156,7 +156,7 @@ static int is_parent_grab_leave(GdkEventCrossing *aEvent);
|
||||
static void GetBrandName(nsXPIDLString& brandName);
|
||||
|
||||
/* callbacks from widgets */
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
static gboolean expose_event_cb (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
#else
|
||||
@ -302,7 +302,7 @@ protected:
|
||||
static inline int32_t
|
||||
GetBitmapStride(int32_t width)
|
||||
{
|
||||
#if defined(MOZ_X11) || defined(MOZ_WIDGET_GTK2)
|
||||
#if defined(MOZ_X11) || (MOZ_WIDGET_GTK == 2)
|
||||
return (width+7)/8;
|
||||
#else
|
||||
return cairo_format_stride_for_width(CAIRO_FORMAT_A1, width);
|
||||
@ -651,7 +651,7 @@ nsWindow::Destroy(void)
|
||||
gFocusWindow = nullptr;
|
||||
}
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2) && defined(MOZ_X11)
|
||||
#if (MOZ_WIDGET_GTK == 2) && defined(MOZ_X11)
|
||||
// make sure that we remove ourself as the plugin focus window
|
||||
if (gPluginFocusWindow == this) {
|
||||
gPluginFocusWindow->LoseNonXEmbedPluginFocus();
|
||||
@ -1907,7 +1907,7 @@ gdk_window_flash(GdkWindow * aGdkWindow,
|
||||
GdkGC * gc = 0;
|
||||
GdkColor white;
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
gdk_window_get_geometry(aGdkWindow,NULL,NULL,&width,&height,NULL);
|
||||
#else
|
||||
gdk_window_get_geometry(aGdkWindow,NULL,NULL,&width,&height);
|
||||
@ -1955,7 +1955,7 @@ gdk_window_flash(GdkWindow * aGdkWindow,
|
||||
#endif // DEBUG
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
gboolean
|
||||
nsWindow::OnExposeEvent(GdkEventExpose *aEvent)
|
||||
#else
|
||||
@ -2000,7 +2000,7 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
GdkRectangle *rects;
|
||||
gint nrects;
|
||||
gdk_region_get_rectangles(aEvent->region, &rects, &nrects);
|
||||
@ -2020,7 +2020,7 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
#endif
|
||||
|
||||
// GTK3 TODO?
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
if (nrects > MAX_RECTS_IN_REGION) {
|
||||
// Just use the bounding box
|
||||
rects[0] = aEvent->area;
|
||||
@ -2034,7 +2034,7 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
|
||||
nsIntRegion region;
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
GdkRectangle *r = rects;
|
||||
GdkRectangle *r_end = rects + nrects;
|
||||
#else
|
||||
@ -2087,7 +2087,7 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
}
|
||||
|
||||
if (region.IsEmpty()) {
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
g_free(rects);
|
||||
#else
|
||||
cairo_rectangle_list_destroy(rects);
|
||||
@ -2113,7 +2113,7 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
}
|
||||
|
||||
gfxASurface* surf;
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
surf = GetThebesSurface();
|
||||
#else
|
||||
surf = GetThebesSurface(cr);
|
||||
@ -2210,7 +2210,7 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
}
|
||||
# ifdef MOZ_HAVE_SHMIMAGE
|
||||
if (nsShmImage::UseShm() && MOZ_LIKELY(!mIsDestroyed)) {
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
mShmImage->Put(mGdkWindow, rects, r_end);
|
||||
#else
|
||||
mShmImage->Put(mGdkWindow, rects);
|
||||
@ -2219,7 +2219,7 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
# endif // MOZ_HAVE_SHMIMAGE
|
||||
#endif // MOZ_X11
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
g_free(rects);
|
||||
#else
|
||||
cairo_rectangle_list_destroy(rects);
|
||||
@ -2228,7 +2228,7 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
listener->DidPaintWindow();
|
||||
|
||||
// Synchronously flush any new dirty areas
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
GdkRegion* dirtyArea = gdk_window_get_update_area(mGdkWindow);
|
||||
#else
|
||||
cairo_region_t* dirtyArea = gdk_window_get_update_area(mGdkWindow);
|
||||
@ -2236,7 +2236,7 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
|
||||
if (dirtyArea) {
|
||||
gdk_window_invalidate_region(mGdkWindow, dirtyArea, false);
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
gdk_region_destroy(dirtyArea);
|
||||
#else
|
||||
cairo_region_destroy(dirtyArea);
|
||||
@ -2507,7 +2507,7 @@ nsWindow::OnMotionNotifyEvent(GdkEventMotion *aEvent)
|
||||
synthEvent = true;
|
||||
XNextEvent (GDK_WINDOW_XDISPLAY(aEvent->window), &xevent);
|
||||
}
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
// if plugins still keeps the focus, get it back
|
||||
if (gPluginFocusWindow && gPluginFocusWindow != this) {
|
||||
nsRefPtr<nsWindow> kungFuDeathGrip = gPluginFocusWindow;
|
||||
@ -2855,7 +2855,7 @@ nsWindow::OnContainerFocusOutEvent(GdkEventFocus *aEvent)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2) && defined(MOZ_X11)
|
||||
#if (MOZ_WIDGET_GTK == 2) && defined(MOZ_X11)
|
||||
// plugin lose focus
|
||||
if (gPluginFocusWindow) {
|
||||
nsRefPtr<nsWindow> kungFuDeathGrip = gPluginFocusWindow;
|
||||
@ -3320,7 +3320,7 @@ CreateGdkWindow(GdkWindow *parent, GtkWidget *widget)
|
||||
attributes.visual = gtk_widget_get_visual(widget);
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
attributes_mask |= GDK_WA_COLORMAP;
|
||||
attributes.colormap = gtk_widget_get_colormap(widget);
|
||||
#endif
|
||||
@ -3329,7 +3329,7 @@ CreateGdkWindow(GdkWindow *parent, GtkWidget *widget)
|
||||
gdk_window_set_user_data(window, widget);
|
||||
|
||||
// GTK3 TODO?
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
/* set the default pixmap to None so that you don't end up with the
|
||||
gtk default which is BlackPixel. */
|
||||
gdk_window_set_back_pixmap(window, NULL, FALSE);
|
||||
@ -3461,7 +3461,7 @@ nsWindow::Create(nsIWidget *aParent,
|
||||
// are on a compositing window manager.
|
||||
GdkScreen *screen = gtk_widget_get_screen(mShell);
|
||||
if (gdk_screen_is_composited(screen)) {
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
GdkColormap *colormap =
|
||||
gdk_screen_get_rgba_colormap(screen);
|
||||
gtk_widget_set_colormap(mShell, colormap);
|
||||
@ -3640,7 +3640,7 @@ nsWindow::Create(nsIWidget *aParent,
|
||||
hierarchy_changed_cb(GTK_WIDGET(mContainer), NULL);
|
||||
// Expose, focus, key, and drag events are sent even to GTK_NO_WINDOW
|
||||
// widgets.
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
g_signal_connect(mContainer, "expose_event",
|
||||
G_CALLBACK(expose_event_cb), NULL);
|
||||
#else
|
||||
@ -3697,7 +3697,7 @@ nsWindow::Create(nsIWidget *aParent,
|
||||
}
|
||||
|
||||
if (eventWidget) {
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
// Don't let GTK mess with the shapes of our GdkWindows
|
||||
GTK_PRIVATE_SET_FLAG(eventWidget, GTK_HAS_SHAPE_MASK);
|
||||
#endif
|
||||
@ -4138,7 +4138,7 @@ nsWindow::SetWindowClipRegion(const nsTArray<nsIntRect>& aRects,
|
||||
if (!mGdkWindow)
|
||||
return;
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
GdkRegion *region = gdk_region_new(); // aborts on OOM
|
||||
for (uint32_t i = 0; i < newRects->Length(); ++i) {
|
||||
const nsIntRect& r = newRects->ElementAt(i);
|
||||
@ -4268,7 +4268,7 @@ nsWindow::ApplyTransparencyBitmap()
|
||||
maskPixmap, ShapeSet);
|
||||
XFreePixmap(xDisplay, maskPixmap);
|
||||
#else
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
gtk_widget_reset_shapes(mShell);
|
||||
GdkBitmap* maskBitmap = gdk_bitmap_create_from_data(gtk_widget_get_window(mShell),
|
||||
mTransparencyBitmap,
|
||||
@ -4537,7 +4537,7 @@ nsWindow::SetNonXEmbedPluginFocus()
|
||||
LOGFOCUS(("\t curFocusWindow=%p\n", curFocusWindow));
|
||||
|
||||
GdkWindow* toplevel = gdk_window_get_toplevel(mGdkWindow);
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
GdkWindow *gdkfocuswin = gdk_window_lookup(curFocusWindow);
|
||||
#else
|
||||
GdkWindow *gdkfocuswin = gdk_x11_window_lookup_for_display(gdkDisplay,
|
||||
@ -4820,7 +4820,7 @@ is_mouse_in_window (GdkWindow* aWindow, gdouble aMouseX, gdouble aMouseY)
|
||||
window = gdk_window_get_parent(window);
|
||||
}
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
gdk_drawable_get_size(aWindow, &w, &h);
|
||||
#else
|
||||
w = gdk_window_get_width(aWindow);
|
||||
@ -5024,7 +5024,7 @@ get_gtk_cursor(nsCursor aCursor)
|
||||
|
||||
// gtk callbacks
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
static gboolean
|
||||
expose_event_cb(GtkWidget *widget, GdkEventExpose *event)
|
||||
{
|
||||
@ -5331,7 +5331,7 @@ plugin_window_filter_func(GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
|
||||
break;
|
||||
xeventWindow = xevent->xreparent.window;
|
||||
}
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
plugin_window = gdk_window_lookup(xeventWindow);
|
||||
#else
|
||||
plugin_window = gdk_x11_window_lookup_for_display(
|
||||
@ -5342,7 +5342,7 @@ plugin_window_filter_func(GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
|
||||
get_gtk_widget_for_gdk_window(plugin_window);
|
||||
|
||||
// TODO GTK3
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
if (GTK_IS_XTBIN(widget)) {
|
||||
nswindow->SetPluginType(nsWindow::PluginType_NONXEMBED);
|
||||
break;
|
||||
@ -5709,7 +5709,7 @@ get_inner_gdk_window (GdkWindow *aWindow,
|
||||
child = g_list_previous(child)) {
|
||||
GdkWindow *childWindow = (GdkWindow *) child->data;
|
||||
if (get_window_for_gdk_window(childWindow)) {
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
gdk_window_get_geometry(childWindow, &cx, &cy, &cw, &ch, NULL);
|
||||
#else
|
||||
gdk_window_get_geometry(childWindow, &cx, &cy, &cw, &ch);
|
||||
@ -5909,7 +5909,7 @@ nsWindow::GetToggledKeyState(uint32_t aKeyCode, bool* aLEDState)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK2)
|
||||
#if defined(MOZ_X11) && (MOZ_WIDGET_GTK == 2)
|
||||
/* static */ already_AddRefed<gfxASurface>
|
||||
nsWindow::GetSurfaceForGdkDrawable(GdkDrawable* aDrawable,
|
||||
const nsIntSize& aSize)
|
||||
@ -5951,7 +5951,7 @@ nsWindow::GetSurfaceForGdkDrawable(GdkDrawable* aDrawable,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
TemporaryRef<DrawTarget>
|
||||
nsWindow::StartRemoteDrawing()
|
||||
{
|
||||
@ -5971,7 +5971,7 @@ nsWindow::StartRemoteDrawing()
|
||||
|
||||
// return the gfxASurface for rendering to this widget
|
||||
gfxASurface*
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
nsWindow::GetThebesSurface()
|
||||
#else
|
||||
nsWindow::GetThebesSurface(cairo_t *cr)
|
||||
@ -5980,7 +5980,7 @@ nsWindow::GetThebesSurface(cairo_t *cr)
|
||||
if (!mGdkWindow)
|
||||
return nullptr;
|
||||
|
||||
#if !defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK != 2)
|
||||
cairo_surface_t *surf = cairo_get_target(cr);
|
||||
if (cairo_surface_status(surf) != CAIRO_STATUS_SUCCESS) {
|
||||
NS_NOTREACHED("Missing cairo target?");
|
||||
@ -5991,7 +5991,7 @@ nsWindow::GetThebesSurface(cairo_t *cr)
|
||||
#ifdef MOZ_X11
|
||||
gint width, height;
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
gdk_drawable_get_size(GDK_DRAWABLE(mGdkWindow), &width, &height);
|
||||
#else
|
||||
width = gdk_window_get_width(mGdkWindow);
|
||||
@ -6021,7 +6021,7 @@ nsWindow::GetThebesSurface(cairo_t *cr)
|
||||
if (!usingShm)
|
||||
# endif // MOZ_HAVE_SHMIMAGE
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
mThebesSurface = new gfxXlibSurface
|
||||
(GDK_WINDOW_XDISPLAY(mGdkWindow),
|
||||
gdk_x11_window_get_xid(mGdkWindow),
|
||||
|
@ -165,7 +165,7 @@ public:
|
||||
gint ConvertBorderStyles(nsBorderStyle aStyle);
|
||||
|
||||
// event callbacks
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
gboolean OnExposeEvent(GdkEventExpose *aEvent);
|
||||
#else
|
||||
gboolean OnExposeEvent(cairo_t *cr);
|
||||
@ -197,7 +197,7 @@ public:
|
||||
guint aTime,
|
||||
gpointer aData);
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
mozilla::TemporaryRef<mozilla::gfx::DrawTarget> StartRemoteDrawing() MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
@ -280,7 +280,7 @@ public:
|
||||
nsresult UpdateTranslucentWindowAlphaInternal(const nsIntRect& aRect,
|
||||
uint8_t* aAlphas, int32_t aStride);
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
gfxASurface *GetThebesSurface();
|
||||
|
||||
static already_AddRefed<gfxASurface> GetSurfaceForGdkDrawable(GdkDrawable* aDrawable,
|
||||
|
Loading…
Reference in New Issue
Block a user