]> git.eshelyaron.com Git - emacs.git/commitdiff
Work around deprecation of gtk_style_context_get_background_color
authorPhilipp Stephani <phst@google.com>
Fri, 29 Sep 2017 21:55:57 +0000 (23:55 +0200)
committerPhilipp Stephani <phst@google.com>
Tue, 3 Oct 2017 12:58:19 +0000 (14:58 +0200)
* src/gtkutil.c (xg_check_special_colors): Replace call to
gtk_style_context_get_background_color with its definition.

src/gtkutil.c

index a07ee4b1b02cce8cb47ea88193f63b3f56106d01..c7d8f92829a9248718a8125f92919cbecd6fac1a 100644 (file)
@@ -577,11 +577,18 @@ xg_check_special_colors (struct frame *f,
     if (get_fg)
       gtk_style_context_get_color (gsty, state, &col);
     else
-      /* FIXME: gtk_style_context_get_background_color is deprecated
-         in GTK+ 3.16.  New versions of GTK+ don’t use the concept of
-         a single background color any more, so we shouldn’t query for
-         it.  */
-      gtk_style_context_get_background_color (gsty, state, &col);
+      {
+        GdkRGBA *c;
+        /* FIXME: Retrieving the background color is deprecated in
+           GTK+ 3.16.  New versions of GTK+ don’t use the concept of a
+           single background color any more, so we shouldn’t query for
+           it.  */
+        gtk_style_context_get (gsty, state,
+                               GTK_STYLE_PROPERTY_BACKGROUND_COLOR, &c,
+                               NULL);
+        col = *c;
+        gdk_rgba_free (c);
+      }
 
     unsigned short
       r = col.red * 65535,