[gtk+] GtkEntry: Refresh when activity ends



commit 8c3f04e75448b9d5f5fa3decfe66d811306142cf
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Dec 8 06:39:19 2014 -0500

    GtkEntry: Refresh when activity ends
    
    We need to queue a redraw when pulse mode is ended by
    setting a fraction. Noticed in gtk3-demo's search entry demo.

 gtk/gtkentry.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index cf9ee67..03fb6d7 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -10617,12 +10617,15 @@ gtk_entry_set_progress_fraction (GtkEntry *entry,
   gdouble          old_fraction;
   gint x, y, width, height;
   gint old_x, old_y, old_width, old_height;
+  gboolean was_pulse;
 
   g_return_if_fail (GTK_IS_ENTRY (entry));
 
   widget = GTK_WIDGET (entry);
   private = entry->priv;
 
+  was_pulse = private->progress_pulse_mode;
+
   if (private->progress_pulse_mode)
     old_fraction = -1;
   else
@@ -10641,7 +10644,8 @@ gtk_entry_set_progress_fraction (GtkEntry *entry,
     {
       get_progress_area (widget, &x, &y, &width, &height);
 
-      if ((x != old_x) || (y != old_y) || (width != old_width) || (height != old_height))
+      if (was_pulse ||
+          x != old_x || y != old_y || width != old_width || height != old_height)
         gtk_widget_queue_draw (widget);
     }
 


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