[retro-gtk] retro-cairo-display: Drop queue_draw()



commit aebaacd0f577667f5882e03e656f99b14af6e818
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat Feb 22 20:53:41 2020 +0500

    retro-cairo-display: Drop queue_draw()
    
    Use gtk_widget_queue_draw() with G_CONNECT_SWAPPED instead.

 retro-gtk/retro-cairo-display.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/retro-gtk/retro-cairo-display.c b/retro-gtk/retro-cairo-display.c
index c4a9d68..75f95f1 100644
--- a/retro-gtk/retro-cairo-display.c
+++ b/retro-gtk/retro-cairo-display.c
@@ -214,28 +214,20 @@ retro_cairo_display_class_init (RetroCairoDisplayClass *klass)
   gtk_widget_class_set_css_name (widget_class, "retrocairodisplay");
 }
 
-static void
-queue_draw (GObject    *sender,
-            GParamSpec *pspec,
-            gpointer    self)
-{
-  gtk_widget_queue_draw (GTK_WIDGET (self));
-}
-
 static void
 retro_cairo_display_init (RetroCairoDisplay *self)
 {
   self->filter = RETRO_VIDEO_FILTER_SMOOTH;
   g_signal_connect_object (G_OBJECT (self),
                            "notify::sensitive",
-                           (GCallback) queue_draw,
+                           (GCallback) gtk_widget_queue_draw,
                            GTK_WIDGET (self),
-                           0);
+                           G_CONNECT_SWAPPED);
   g_signal_connect_object (G_OBJECT (self),
                            "notify::pixbuf",
-                           (GCallback) queue_draw,
+                           (GCallback) gtk_widget_queue_draw,
                            GTK_WIDGET (self),
-                           0);
+                           G_CONNECT_SWAPPED);
 }
 
 static void


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