On Thu, May 17, 2001 at 04:35:02AM -0800, Ethan Benson wrote: > i tried applying blizzards patch as i found it in bugzilla but mozilla > then failed to compile. apparently the one in bugzilla is broken, and > im not downloading 30MB of src.rpm crap to see whats in there... Do you mean this patch? This one has one trivial typo fixed (gtk -> gdk somewhere in there.) galeon works great. -- Tommi Komulainen Tommi.Komulainen@iki.fi GPG 1024D/68388EE6 6FD6 DD79 EB38 BF6F 3533 09C0 04A8 9871 6838 8EE6
Index: gtkmozarea.c
===================================================================
RCS file: /cvsroot/mozilla/widget/src/gtksuperwin/gtkmozarea.c,v
retrieving revision 1.3
diff -u -r1.3 gtkmozarea.c
--- gtkmozarea.c 2001/05/03 12:04:53 1.3
+++ gtkmozarea.c 2001/05/05 19:27:12
@@ -25,6 +25,7 @@
static void gtk_mozarea_unrealize (GtkWidget *widget);
static void gtk_mozarea_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
+static void gtk_mozarea_destroy (GtkObject *object);
static void
attach_toplevel_listener(GtkMozArea *mozarea);
@@ -85,6 +86,8 @@
widget_class->unrealize = gtk_mozarea_unrealize;
widget_class->size_allocate = gtk_mozarea_size_allocate;
+ object_class->destroy = gtk_mozarea_destroy;
+
parent_class = gtk_type_class(gtk_widget_get_type());
/* set up our signals */
@@ -112,6 +115,7 @@
{
mozarea->superwin = NULL;
mozarea->toplevel_focus = FALSE;
+ mozarea->toplevel_window = NULL;
}
static void
@@ -179,6 +183,22 @@
}
}
+static void
+gtk_mozarea_destroy(GtkObject *object)
+{
+ GtkMozArea *mozarea;
+
+ g_return_if_fail(GTK_IS_MOZAREA(object));
+
+ mozarea = GTK_MOZAREA(object);
+
+ /* remove the filter on the toplevel window */
+ gdk_window_remove_filter(mozarea->toplevel_window, toplevel_window_filter,
+ mozarea);
+
+ GTK_OBJECT_CLASS(parent_class)->destroy(object);
+}
+
GtkWidget*
gtk_mozarea_new (GdkWindow *parent_window)
{
@@ -220,6 +240,10 @@
automatically be removed. */
gdk_window_add_filter(gdk_window, toplevel_window_filter, mozarea);
+
+ /* save it so that we can remove the filter later */
+
+ mozarea->toplevel_window = gdk_window;
}
/* this function will try to find the real toplevel for a gdk window. */
Index: gtkmozarea.h
===================================================================
RCS file: /cvsroot/mozilla/widget/src/gtksuperwin/gtkmozarea.h,v
retrieving revision 1.2
diff -u -r1.2 gtkmozarea.h
--- gtkmozarea.h 2001/05/03 12:04:53 1.2
+++ gtkmozarea.h 2001/05/05 19:27:12
@@ -39,6 +39,9 @@
GtkWidget widget;
GdkSuperWin *superwin;
gboolean toplevel_focus;
+
+ /* store away the toplevel window */
+ GdkWindow *toplevel_window;
};
struct _GtkMozAreaClass
Attachment:
pgpJRj2PA_IKE.pgp
Description: PGP signature