summaryrefslogtreecommitdiff
path: root/lisp/dynamic-setting.el
diff options
context:
space:
mode:
authorJan D <jan.h.d@swipnet.se>2010-08-11 20:28:10 +0200
committerJan D <jan.h.d@swipnet.se>2010-08-11 20:28:10 +0200
commit3a46642b081c504b6e25c65d81999fcc0dff5fb2 (patch)
treea7f42c1836467e6c8539cef167977a48c182ad97 /lisp/dynamic-setting.el
parent42ca463309fdb17f04a72dad92696312bf242328 (diff)
downloademacs-3a46642b081c504b6e25c65d81999fcc0dff5fb2.tar.gz
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.
Diffstat (limited to 'lisp/dynamic-setting.el')
-rw-r--r--lisp/dynamic-setting.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/dynamic-setting.el b/lisp/dynamic-setting.el
index f61a0078e17..790aaf7170e 100644
--- a/lisp/dynamic-setting.el
+++ b/lisp/dynamic-setting.el
@@ -96,6 +96,11 @@ Changes can be
((eq type 'font-render)
(font-setting-change-default-font display-name nil))
+ ;; This is a bit heavy, ideally we would just clear faces
+ ;; on the affected display, and perhaps only the relevant
+ ;; faces. Oh well.
+ ((eq type 'theme-name) (clear-face-cache))
+
((eq type 'tool-bar-style) (force-mode-line-update t)))))
(define-key special-event-map [config-changed-event]