emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Work around deprecation of gtk_style_context_get_background_


From: Philipp Stephani
Subject: Re: [PATCH] Work around deprecation of gtk_style_context_get_background_color
Date: Tue, 03 Oct 2017 13:02:09 +0000



Philipp Stephani <address@hidden> schrieb am Fr., 29. Sep. 2017 um 23:58 Uhr:
* src/gtkutil.c (xg_check_special_colors): Replace call to
gtk_style_context_get_background_color with its definition.
---
 src/gtkutil.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/gtkutil.c b/src/gtkutil.c
index 9f05524738..015456cd81 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -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);
+      }


Pushed as 0fff900c18 to emacs-26.
--

Google Germany GmbH
Erika-Mann-Straße 33
80636 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

If you received this communication by mistake, please don't forward it to anyone else (it may contain confidential or privileged information), please erase all copies of it, including all attachments, and please let the sender know it went to the wrong person. Thanks.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]