[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master f6818e7: GTK+: Stop querying for background colors.
From: |
Philipp Stephani |
Subject: |
[Emacs-diffs] master f6818e7: GTK+: Stop querying for background colors. |
Date: |
Sat, 23 Sep 2017 06:51:32 -0400 (EDT) |
branch: master
commit f6818e761eaafe095e07249180dc8f9a329f1473
Author: Philipp Stephani <address@hidden>
Commit: Philipp Stephani <address@hidden>
GTK+: Stop querying for background colors.
* src/gtkutil.c (xg_check_special_colors): Don't call deprecated
function gtk_style_context_get_background_color in newer versions of
GTK+.
---
src/gtkutil.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/gtkutil.c b/src/gtkutil.c
index f3e89c8..b98b0d0 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -566,6 +566,14 @@ xg_check_special_colors (struct frame *f,
if (! FRAME_GTK_WIDGET (f) || ! (get_bg || get_fg))
return success_p;
+#if GTK_CHECK_VERSION (3, 16, 0)
+ if (get_bg)
+ /* 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 can't query for it. */
+ return false;
+#endif
+
block_input ();
{
#ifdef HAVE_GTK3
@@ -577,7 +585,12 @@ xg_check_special_colors (struct frame *f,
if (get_fg)
gtk_style_context_get_color (gsty, state, &col);
else
+#if GTK_CHECK_VERSION (3, 16, 0)
+ /* We can't get here. */
+ emacs_abort ();
+#else
gtk_style_context_get_background_color (gsty, state, &col);
+#endif
unsigned short
r = col.red * 65535,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master f6818e7: GTK+: Stop querying for background colors.,
Philipp Stephani <=