[Xfce4-commits] [apps/parole] 01/01: Cleanup gstreamer background-drawing

noreply at xfce.org noreply at xfce.org
Tue Jun 17 15:22:36 CEST 2014


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository apps/parole.

commit 889370d1d96e77f5066faba6822b8f595fd42634
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Tue Jun 17 15:22:31 2014 +0200

    Cleanup gstreamer background-drawing
---
 src/gst/parole-gst.c |   21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/src/gst/parole-gst.c b/src/gst/parole-gst.c
index 2f2300a..08d94db 100644
--- a/src/gst/parole-gst.c
+++ b/src/gst/parole-gst.c
@@ -222,23 +222,10 @@ parole_gst_configure_event_cb (GtkWidget *widget, GdkEventConfigure *ev, ParoleG
 }
 
 static gboolean
-parole_gst_parent_expose_event (GtkWidget *w, GdkEventExpose *ev, ParoleGst *gst)
+parole_gst_parent_expose_event (GtkWidget *widget, cairo_t *cr, gpointer user_data)
 {
-    GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
-    cairo_t *cr;
-
-    gtk_widget_get_allocation(w, allocation);
-
-    cr = gdk_cairo_create ( gtk_widget_get_window(w) );
-
-    cairo_set_source_rgb (cr, 0.0f, 0.0f, 0.0f);
-
-    cairo_rectangle (cr, allocation->x, allocation->y, allocation->width, allocation->height);
-
-    cairo_fill (cr);
-    cairo_destroy (cr);
-
-    g_free(allocation);
+    cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
+    cairo_paint (cr);
 
     return FALSE;
 }
@@ -285,7 +272,7 @@ parole_gst_realize (GtkWidget *widget)
                          G_CALLBACK (parole_gst_configure_event_cb), gst);
 
     g_signal_connect    (gtk_widget_get_parent(gtk_widget_get_parent (widget)), "draw",
-                         G_CALLBACK (parole_gst_parent_expose_event), gst);
+                         G_CALLBACK (parole_gst_parent_expose_event), NULL);
 
     g_free(allocation);
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list