From 77038a9b0b435270e701aa5b8d11e1f5e5b18c85 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 18 Oct 2016 19:42:19 +0200 Subject: [PATCH] widget: Inline function into only caller ... and remove all the checks that are not needed in this case. --- gtk/gtkwidget.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 14ea19567b..3ec848d30a 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -4057,21 +4057,6 @@ gtk_widget_new (GType type, return widget; } -static inline void -gtk_widget_queue_draw_child (GtkWidget *widget) -{ - GtkWidgetPrivate *priv = widget->priv; - GtkWidget *parent; - - parent = priv->parent; - if (parent && _gtk_widget_is_drawable (parent)) - gtk_widget_queue_draw_area (parent, - priv->clip.x, - priv->clip.y, - priv->clip.width, - priv->clip.height); -} - /** * gtk_widget_unparent: * @widget: a #GtkWidget @@ -4109,7 +4094,12 @@ gtk_widget_unparent (GtkWidget *widget) if (gtk_container_get_focus_child (GTK_CONTAINER (priv->parent)) == widget) gtk_container_set_focus_child (GTK_CONTAINER (priv->parent), NULL); - gtk_widget_queue_draw_child (widget); + if (_gtk_widget_is_drawable (priv->parent)) + gtk_widget_queue_draw_area (priv->parent, + priv->clip.x, + priv->clip.y, + priv->clip.width, + priv->clip.height); /* Reset the width and height here, to force reallocation if we * get added back to a new parent. This won't work if our new