Mercurial > emacs
diff src/xfns.c @ 109749:be18c3b67d66
Take colors for region face (selected text) from the Gtk+ theme.
* lisp/dynamic-setting.el (dynamic-setting-handle-config-changed-event):
Handle theme-name change.
* lisp/faces.el (region): Add type gtk that uses gtk colors.
* src/gtkutil.c (xg_check_special_colors, style_changed_cb): New functions.
(xg_create_frame_widgets): Connect theme name changes to
style_changed_cb.
* src/gtkutil.h (xg_check_special_colors): Declare.
* src/xfns.c (x_defined_color): If USE_GTK, call xg_check_special_colors
first.
author | Jan D <jan.h.d@swipnet.se> |
---|---|
date | Wed, 11 Aug 2010 20:28:10 +0200 |
parents | 77fb60d4233b |
children | 0851022edd4b |
line wrap: on
line diff
--- a/src/xfns.c Wed Aug 11 14:34:46 2010 +0200 +++ b/src/xfns.c Wed Aug 11 20:28:10 2010 +0200 @@ -648,12 +648,16 @@ x_defined_color (struct frame *f, const char *color_name, XColor *color, int alloc_p) { - int success_p; + int success_p = 0; Display *dpy = FRAME_X_DISPLAY (f); Colormap cmap = FRAME_X_COLORMAP (f); BLOCK_INPUT; - success_p = XParseColor (dpy, cmap, color_name, color); +#ifdef USE_GTK + success_p = xg_check_special_colors (f, color_name, color); +#endif + if (!success_p) + success_p = XParseColor (dpy, cmap, color_name, color); if (success_p && alloc_p) success_p = x_alloc_nearest_color (f, cmap, color); UNBLOCK_INPUT;