[libwnck/wip/warnings3: 5/5] tasklist: avoid deprecated gtk_style_context_get_background_color



commit b6918d64632baef201711adf1bc2995110f83a72
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Apr 28 14:17:54 2017 +0300

    tasklist: avoid deprecated gtk_style_context_get_background_color

 libwnck/tasklist.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
index 34d7d9b..ed77e83 100644
--- a/libwnck/tasklist.c
+++ b/libwnck/tasklist.c
@@ -3988,16 +3988,13 @@ wnck_task_draw (GtkWidget *widget,
   gtk_widget_style_get (tasklist_widget, "fade-overlay-rect", &overlay_rect, NULL);
   if (overlay_rect)
     {
-      GdkRGBA bg_color;
-
       gtk_style_context_save (context);
       gtk_style_context_set_state (context, GTK_STATE_FLAG_SELECTED);
-      gtk_style_context_get_background_color (context, GTK_STATE_FLAG_SELECTED, &bg_color);
-      gtk_style_context_restore (context);
 
       /* Draw a rectangle with selected background color */
-      gdk_cairo_set_source_rgba (cr, &bg_color);
-      cairo_paint (cr);
+      gtk_render_background (context, cr, 0, 0, width, height);
+
+      gtk_style_context_restore (context);
     }
   else
     {


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