From: Philipp Stephani <p.stephani2@gmail.com>
To: emacs-devel@gnu.org
Cc: Philipp Stephani <phst@google.com>
Subject: [PATCH] Work around deprecation of gtk_style_context_get_background_color
Date: Fri, 29 Sep 2017 23:57:23 +0200 [thread overview]
Message-ID: <20170929215723.30791-1-phst@google.com> (raw)
In-Reply-To: <CAArVCkRdb4Fn0rgqaEVmb4cdpg6sjLbaLUHB+YkZ-=QFnYJziQ@mail.gmail.com>
* 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);
+ }
unsigned short
r = col.red * 65535,
--
2.14.2.822.g60be5d43e6-goog
next prev parent reply other threads:[~2017-09-29 21:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-28 20:05 bug#28636: 27.0.50; Unable to load color "gtk_selection_bg_color" in 27.0.50 aplanas
2017-09-28 20:22 ` Philipp Stephani
2017-09-29 8:34 ` martin rudalics
2017-09-29 20:42 ` Philipp Stephani
2017-09-29 21:05 ` Eli Zaretskii
2017-09-29 21:42 ` Philipp Stephani
2017-09-29 21:57 ` Philipp Stephani [this message]
2017-10-03 13:02 ` [PATCH] Work around deprecation of gtk_style_context_get_background_color Philipp Stephani
2017-09-30 6:50 ` bug#28636: 27.0.50; Unable to load color "gtk_selection_bg_color" in 27.0.50 Eli Zaretskii
2017-09-29 20:44 ` Philipp Stephani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170929215723.30791-1-phst@google.com \
--to=p.stephani2@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=phst@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.