summaryrefslogtreecommitdiff
path: root/gtk/gtkplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkplug.c')
-rw-r--r--gtk/gtkplug.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 79554c2e62..4504d84900 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -30,6 +30,7 @@
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkplug.h"
+#include "gtksizerequest.h"
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkplugprivate.h"
@@ -792,8 +793,12 @@ static void
gtk_plug_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
+ GtkRequisition natural_size;
+ GtkBin *bin = GTK_BIN (widget);
GtkWidget *child;
+ child = gtk_bin_get_child (bin);
+
if (gtk_widget_is_toplevel (widget))
GTK_WIDGET_CLASS (gtk_plug_parent_class)->size_allocate (widget, allocation);
else
@@ -807,8 +812,6 @@ gtk_plug_size_allocate (GtkWidget *widget,
allocation->x, allocation->y,
allocation->width, allocation->height);
- child = gtk_bin_get_child (bin);
-
if (child != NULL && gtk_widget_get_visible (child))
{
GtkAllocation child_allocation;
@@ -823,6 +826,10 @@ gtk_plug_size_allocate (GtkWidget *widget,
}
}
+
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ NULL, &natural_size);
+ _gtk_plug_windowing_publish_natural_size (GTK_PLUG (widget), &natural_size);
}
static gboolean