mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 914607 - Remove MOZ_WIDGET_GTK2. r=karlt
This commit is contained in:
parent
4625de3ae1
commit
a3e25dd947
@ -4394,7 +4394,6 @@ cairo-gtk2|cairo-gtk2-x11)
|
||||
|
||||
TK_CFLAGS='$(MOZ_GTK2_CFLAGS)'
|
||||
TK_LIBS='$(MOZ_GTK2_LIBS)'
|
||||
AC_DEFINE(MOZ_WIDGET_GTK2)
|
||||
MOZ_WIDGET_GTK=2
|
||||
AC_DEFINE_UNQUOTED(MOZ_WIDGET_GTK,$MOZ_WIDGET_GTK)
|
||||
MOZ_PDF_PRINTING=1
|
||||
|
@ -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)
|
||||
|
@ -556,7 +556,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);
|
||||
|
@ -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(),
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "AndroidBridge.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
|
||||
@ -43,7 +43,7 @@ DownloadPlatform* DownloadPlatform::GetDownloadPlatform()
|
||||
|
||||
NS_ADDREF(gDownloadPlatformService);
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
g_type_init();
|
||||
#endif
|
||||
|
||||
@ -67,10 +67,10 @@ static void gio_set_metadata_done(GObject *source_obj, GAsyncResult *res, gpoint
|
||||
nsresult DownloadPlatform::DownloadDone(nsIURI* aSource, nsIFile* aTarget,
|
||||
const nsACString& aContentType, bool aIsPrivate)
|
||||
{
|
||||
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GTK2)
|
||||
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) || (MOZ_WIDGET_GTK == 2)
|
||||
nsAutoString path;
|
||||
if (aTarget && NS_SUCCEEDED(aTarget->GetPath(path))) {
|
||||
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK2)
|
||||
#if defined(XP_WIN) || (MOZ_WIDGET_GTK == 2)
|
||||
// On Windows and Gtk, add the download to the system's "recent documents"
|
||||
// list, with a pref to disable.
|
||||
{
|
||||
@ -78,7 +78,7 @@ nsresult DownloadPlatform::DownloadDone(nsIURI* aSource, nsIFile* aTarget,
|
||||
if (addToRecentDocs && !aIsPrivate) {
|
||||
#ifdef XP_WIN
|
||||
::SHAddToRecentDocs(SHARD_PATHW, path.get());
|
||||
#elif defined(MOZ_WIDGET_GTK2)
|
||||
#elif (MOZ_WIDGET_GTK == 2)
|
||||
GtkRecentManager* manager = gtk_recent_manager_get_default();
|
||||
|
||||
gchar* uri = g_filename_to_uri(NS_ConvertUTF16toUTF8(path).get(),
|
||||
|
@ -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);
|
||||
@ -2112,7 +2112,7 @@ nsWindow::OnExposeEvent(cairo_t *cr)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
nsRefPtr<gfxContext> ctx = new gfxContext(GetThebesSurface());
|
||||
#else
|
||||
nsRefPtr<gfxContext> ctx = new gfxContext(GetThebesSurface(cr));
|
||||
@ -2207,7 +2207,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);
|
||||
@ -2216,7 +2216,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);
|
||||
@ -2225,7 +2225,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);
|
||||
@ -2233,7 +2233,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);
|
||||
@ -2466,7 +2466,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;
|
||||
@ -2814,7 +2814,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;
|
||||
@ -3279,7 +3279,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
|
||||
@ -3288,7 +3288,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);
|
||||
@ -3420,7 +3420,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);
|
||||
@ -3599,7 +3599,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
|
||||
@ -3656,7 +3656,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
|
||||
@ -4097,7 +4097,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);
|
||||
@ -4227,7 +4227,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,
|
||||
@ -4496,7 +4496,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,
|
||||
@ -4779,7 +4779,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);
|
||||
@ -4983,7 +4983,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)
|
||||
{
|
||||
@ -5290,7 +5290,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(
|
||||
@ -5301,7 +5301,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;
|
||||
@ -5668,7 +5668,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);
|
||||
@ -5868,7 +5868,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)
|
||||
@ -5910,7 +5910,7 @@ nsWindow::GetSurfaceForGdkDrawable(GdkDrawable* aDrawable,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK2)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
TemporaryRef<DrawTarget>
|
||||
nsWindow::StartRemoteDrawing()
|
||||
{
|
||||
@ -5930,7 +5930,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)
|
||||
@ -5939,7 +5939,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?");
|
||||
@ -5950,7 +5950,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);
|
||||
@ -5980,7 +5980,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),
|
||||
|
@ -164,7 +164,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);
|
||||
@ -196,7 +196,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
|
||||
|
||||
@ -277,7 +277,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