From dc473b4180fbca5f92a71278b7bfc7c0119a24b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 2 Jul 2017 08:29:07 +0200 Subject: [PATCH] textview: Remove size_changed check in size-allocate It's broken and we only hit size-allocate when the size changes anyway. --- gtk/gtktextview.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 5c2ee26ee5..20d4796de7 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -4186,7 +4186,6 @@ static void gtk_text_view_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { - GtkAllocation widget_allocation; GtkTextView *text_view; GtkTextViewPrivate *priv; gint width, height; @@ -4195,18 +4194,12 @@ gtk_text_view_size_allocate (GtkWidget *widget, GdkRectangle right_rect; GdkRectangle top_rect; GdkRectangle bottom_rect; - gboolean size_changed; text_view = GTK_TEXT_VIEW (widget); priv = text_view->priv; DV(g_print(G_STRLOC"\n")); - gtk_widget_get_allocation (widget, &widget_allocation); - size_changed = - widget_allocation.width != allocation->width || - widget_allocation.height != allocation->height; - /* distribute width/height among child windows. Ensure all * windows get at least a 1x1 allocation. */ @@ -4305,12 +4298,6 @@ gtk_text_view_size_allocate (GtkWidget *widget, */ gtk_text_view_flush_first_validate (text_view); - /* widget->window doesn't get auto-redrawn as the layout is computed, so has to - * be invalidated - */ - if (size_changed) - gtk_widget_queue_draw (widget); - gtk_widget_set_clip (widget, allocation); }