aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-11-13 05:40:27 +0800
committerChristian Persch <chpe@src.gnome.org>2004-11-13 05:40:27 +0800
commit10b65bb8d65694b0fc3faad1349551b3da32f1df (patch)
treef0533ffdedd78c5150f81922ad2930e6b654e85b /src
parent6a9df196108b4a27ec27a35e948dc5566f6bd8c6 (diff)
downloadgsoc2013-epiphany-10b65bb8d65694b0fc3faad1349551b3da32f1df.tar
gsoc2013-epiphany-10b65bb8d65694b0fc3faad1349551b3da32f1df.tar.gz
gsoc2013-epiphany-10b65bb8d65694b0fc3faad1349551b3da32f1df.tar.bz2
gsoc2013-epiphany-10b65bb8d65694b0fc3faad1349551b3da32f1df.tar.lz
gsoc2013-epiphany-10b65bb8d65694b0fc3faad1349551b3da32f1df.tar.xz
gsoc2013-epiphany-10b65bb8d65694b0fc3faad1349551b3da32f1df.tar.zst
gsoc2013-epiphany-10b65bb8d65694b0fc3faad1349551b3da32f1df.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 86897e764..19add5841 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -262,14 +262,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);
}
@@ -287,8 +291,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);
}