summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-04-09 14:09:42 +0200
committerCarlos Garnacho <carlosg@gnome.org>2015-04-13 12:43:15 +0200
commitfb54abb087ce6bdb3d6f45c2710d0ace1d2b828c (patch)
treeb268755dd80a48f661ee2f1bc4c9ab461364d69c
parent946cc8ae4dbed6bba2dcba8fba3b3f6fc8b32d3b (diff)
downloadgtk+-fb54abb087ce6bdb3d6f45c2710d0ace1d2b828c.tar.gz
plug: Remove size_allocate handler
Since windows can be intermediate containers this is somewhat redundant, plus gtk_window_size_allocate() will do additional things like allocating the popovers, which was mistakenly skipped by local plugs not chaining up. https://bugzilla.gnome.org/show_bug.cgi?id=747553
-rw-r--r--gtk/gtkplug.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 7f68e0a2fe..c0201c943c 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -92,8 +92,6 @@ static void gtk_plug_show (GtkWidget *widget)
static void gtk_plug_hide (GtkWidget *widget);
static void gtk_plug_map (GtkWidget *widget);
static void gtk_plug_unmap (GtkWidget *widget);
-static void gtk_plug_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
static gboolean gtk_plug_key_press_event (GtkWidget *widget,
GdkEventKey *event);
static gboolean gtk_plug_focus_event (GtkWidget *widget,
@@ -177,7 +175,6 @@ gtk_plug_class_init (GtkPlugClass *class)
widget_class->hide = gtk_plug_hide;
widget_class->map = gtk_plug_map;
widget_class->unmap = gtk_plug_unmap;
- widget_class->size_allocate = gtk_plug_size_allocate;
widget_class->focus = gtk_plug_focus;
@@ -1180,43 +1177,6 @@ gtk_plug_unmap (GtkWidget *widget)
GTK_WIDGET_CLASS (bin_class)->unmap (widget);
}
-static void
-gtk_plug_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- GtkWidget *child;
-
- if (gtk_widget_is_toplevel (widget))
- GTK_WIDGET_CLASS (gtk_plug_parent_class)->size_allocate (widget, allocation);
- else
- {
- GtkBin *bin = GTK_BIN (widget);
-
- gtk_widget_set_allocation (widget, allocation);
-
- if (gtk_widget_get_realized (widget))
- gdk_window_move_resize (gtk_widget_get_window (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;
-
- child_allocation.x = child_allocation.y = gtk_container_get_border_width (GTK_CONTAINER (widget));
- child_allocation.width =
- MAX (1, (gint)allocation->width - child_allocation.x * 2);
- child_allocation.height =
- MAX (1, (gint)allocation->height - child_allocation.y * 2);
-
- gtk_widget_size_allocate (child, &child_allocation);
- }
-
- }
-}
-
static gboolean
gtk_plug_key_press_event (GtkWidget *widget,
GdkEventKey *event)