From 3593fd2a299852a83d156611e6e100015d9f308c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 7 Apr 2018 09:26:31 +0200 Subject: [PATCH] toolbar: Avoid a get_own_allocation call We want the content allocation here since we are allocation child widgets. --- gtk/gtktoolbar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index ffded91c29..b75a1c9e6b 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -1005,7 +1005,10 @@ gtk_toolbar_begin_sliding (GtkToolbar *toolbar) g_source_set_name_by_id (priv->idle_id, "[gtk+] slide_idle_handler"); } - gtk_widget_get_own_allocation (widget, &content_allocation); + content_allocation.x = 0; + content_allocation.y = 0; + content_allocation.width = gtk_widget_get_width (widget); + content_allocation.height = gtk_widget_get_height (widget); rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL); vertical = (priv->orientation == GTK_ORIENTATION_VERTICAL); @@ -1021,9 +1024,6 @@ gtk_toolbar_begin_sliding (GtkToolbar *toolbar) cur_y = 0; } - cur_x += content_allocation.x; - cur_y += content_allocation.y; - for (list = priv->content; list != NULL; list = list->next) { ToolbarContent *content = list->data;