[gtk+/wip/baedert/drawing: 324/355] textview: Remove size_changed check in size-allocate



commit ba216c0d8c8c9e9350fcb456eb4bf0533c56c6a9
Author: Timm Bäder <mail baedert org>
Date:   Sun Jul 2 08:29:07 2017 +0200

    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 files changed, 0 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 5c2ee26..20d4796 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);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]