Implement extended layout for plug/socket

This commit is contained in:
Matthias Clasen
2009-12-19 01:23:58 -05:00
parent 9a48091064
commit 56edab3553
6 changed files with 175 additions and 1 deletions

View File

@ -30,6 +30,7 @@
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkplug.h"
#include "gtkextendedlayout.h"
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkplugprivate.h"
@ -721,6 +722,9 @@ static void
gtk_plug_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkBin *bin = GTK_BIN (widget);
GtkRequisition natural_size;
if (GTK_WIDGET_TOPLEVEL (widget))
GTK_WIDGET_CLASS (gtk_plug_parent_class)->size_allocate (widget, allocation);
else
@ -748,6 +752,10 @@ gtk_plug_size_allocate (GtkWidget *widget,
}
}
gtk_extended_layout_get_desired_size (GTK_EXTENDED_LAYOUT (bin->child),
NULL, &natural_size);
_gtk_plug_windowing_publish_natural_size (GTK_PLUG (widget), &natural_size);
}
static gboolean