aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2007-11-06 03:55:05 +0800
committerXan Lopez <xan@src.gnome.org>2007-11-06 03:55:05 +0800
commitbb54d7c84793003d90685a7210fb9614adedb77f (patch)
tree3ca9d11673e19580181e8359133e2bbca67e520c /embed/mozilla
parentd73b100991cd2b294365bf5cc5f9627fdaa979a9 (diff)
downloadgsoc2013-epiphany-bb54d7c84793003d90685a7210fb9614adedb77f.tar
gsoc2013-epiphany-bb54d7c84793003d90685a7210fb9614adedb77f.tar.gz
gsoc2013-epiphany-bb54d7c84793003d90685a7210fb9614adedb77f.tar.bz2
gsoc2013-epiphany-bb54d7c84793003d90685a7210fb9614adedb77f.tar.lz
gsoc2013-epiphany-bb54d7c84793003d90685a7210fb9614adedb77f.tar.xz
gsoc2013-epiphany-bb54d7c84793003d90685a7210fb9614adedb77f.tar.zst
gsoc2013-epiphany-bb54d7c84793003d90685a7210fb9614adedb77f.zip
Put size_allocate hack in MozillaEmbed now.
svn path=/trunk/; revision=7629
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/mozilla-embed.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 62cbd6adf..455d81b56 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -201,6 +201,28 @@ mozilla_embed_constructor (GType type, guint n_construct_properties,
}
static void
+mozilla_embed_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation)
+{
+ GtkWidget *child;
+ GtkAllocation invalid = { -1, -1, 1, 1 };
+
+ widget->allocation = *allocation;
+
+ child = GTK_BIN (widget)->child;
+ g_return_if_fail (child != NULL);
+
+ /* only resize if we're mapped (bug #128191),
+ * or if this is the initial size-allocate (bug #156854).
+ */
+ if (GTK_WIDGET_MAPPED (child) ||
+ memcmp (&child->allocation, &invalid, sizeof (GtkAllocation)) == 0)
+ {
+ gtk_widget_size_allocate (child, allocation);
+ }
+}
+
+static void
mozilla_embed_class_init (MozillaEmbedClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -214,6 +236,7 @@ mozilla_embed_class_init (MozillaEmbedClass *klass)
widget_class->grab_focus = mozilla_embed_grab_focus;
widget_class->realize = mozilla_embed_realize;
+ widget_class->size_allocate = mozilla_embed_size_allocate;
g_type_class_add_private (object_class, sizeof(MozillaEmbedPrivate));
}