[gtk+] gtk-demo: queue_draw() when the color changes



commit 2f5737cc1c8ada0683d1ec063d5877b2fbae2358
Author: Benjamin Otte <otte redhat com>
Date:   Tue Jan 3 23:34:53 2017 +0100

    gtk-demo: queue_draw() when the color changes

 demos/gtk-demo/colorsel.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/demos/gtk-demo/colorsel.c b/demos/gtk-demo/colorsel.c
index 3ce6193..29f0857 100644
--- a/demos/gtk-demo/colorsel.c
+++ b/demos/gtk-demo/colorsel.c
@@ -32,7 +32,10 @@ response_cb (GtkDialog *dialog,
              gpointer   user_data)
 {
   if (response_id == GTK_RESPONSE_OK)
-    gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (dialog), &color);
+    {
+      gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (dialog), &color);
+      gtk_widget_queue_draw (da);
+    }
 
   gtk_widget_destroy (GTK_WIDGET (dialog));
 }


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