aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-11-13 05:39:28 +0800
committerChristian Persch <chpe@src.gnome.org>2004-11-13 05:39:28 +0800
commitbb2325b0400dcd15fb49c1628e2c3836aebdaa8a (patch)
tree0af09f9972d689a4dba2d5763e5c9ed1c625ec96 /src
parentf3bc7acce2043d85011e71c369a06b3979c30734 (diff)
downloadgsoc2013-epiphany-bb2325b0400dcd15fb49c1628e2c3836aebdaa8a.tar
gsoc2013-epiphany-bb2325b0400dcd15fb49c1628e2c3836aebdaa8a.tar.gz
gsoc2013-epiphany-bb2325b0400dcd15fb49c1628e2c3836aebdaa8a.tar.bz2
gsoc2013-epiphany-bb2325b0400dcd15fb49c1628e2c3836aebdaa8a.tar.lz
gsoc2013-epiphany-bb2325b0400dcd15fb49c1628e2c3836aebdaa8a.tar.xz
gsoc2013-epiphany-bb2325b0400dcd15fb49c1628e2c3836aebdaa8a.tar.zst
gsoc2013-epiphany-bb2325b0400dcd15fb49c1628e2c3836aebdaa8a.zip
Size-allocate the embed if it's not mapped but has never been
2004-11-12 Christian Persch <chpe@cvs.gnome.org> * src/ephy-tab.c: (ephy_tab_size_allocate), (ephy_tab_map): Size-allocate the embed if it's not mapped but has never been size-allocated before. Fixes bug #156854.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-tab.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 94ce6cbfa..b543a60e8 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -260,14 +260,18 @@ ephy_tab_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 (which means we're drawable) */
- if (GTK_WIDGET_MAPPED (child))
+ /* 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);
}
@@ -285,8 +289,13 @@ ephy_tab_map (GtkWidget *widget)
/* we do this since the window might have been resized while this
* tab wasn't mapped (i.e. was a non-active tab during the resize).
+ * See bug #156854.
*/
- gtk_widget_size_allocate (child, &widget->allocation);
+ if (memcmp (&widget->allocation, &child->allocation,
+ sizeof (GtkAllocation)) != 0)
+ {
+ gtk_widget_size_allocate (child, &widget->allocation);
+ }
GTK_WIDGET_CLASS (parent_class)->map (widget);
}