summaryrefslogtreecommitdiff
path: root/lisp/term
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2015-09-26 09:50:58 +0300
committerEli Zaretskii <eliz@gnu.org>2015-09-26 09:50:58 +0300
commite573d08ef15f0431ad8289b4242c49826f20efb6 (patch)
tree323f37b911569c654747df2047f236ad5d316587 /lisp/term
parent3fbc53b09c21d5657c62a4a295b5b70a6ea5d661 (diff)
downloademacs-e573d08ef15f0431ad8289b4242c49826f20efb6.tar.gz
Make face realization be more frame-specific
* src/frame.h (struct f): New flag face_change. * src/xfaces.c (Finternal_make_lisp_face) (Finternal_copy_lisp_face, Finternal_set_lisp_face_attribute) (update_face_from_frame_parameter): Set the face_change flag only for the frame whose faces are affected. * src/xdisp.c (init_iterator): If a frame's face_change flag is set, free faces only on that frame. (redisplay_internal): Disable "display optimization 1" if the frame's face_change flag is set. (redisplay_window): Don't allow skipping a window's redisplay if its frame's face_change flag is set. * src/frame.c (x_set_screen_gamma): Instead of calling Fclear_face_cache, call clear_face_cache and set windows_or_buffers_changed to a non-zero value. This avoids setting the global face_change flag that triggers face realization on all frames and thorough redisplay of all of them. * lisp/term/tty-colors.el (tty-register-default-colors): Don't clear face cache if the selected frame is a GUI frame.
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/tty-colors.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/term/tty-colors.el b/lisp/term/tty-colors.el
index 98108ce6356..3bc1aa0ee48 100644
--- a/lisp/term/tty-colors.el
+++ b/lisp/term/tty-colors.el
@@ -810,9 +810,11 @@ Value is the modified color alist for FRAME."
(while colors
(tty-color-define (car color) (cadr color) (cddr color))
(setq colors (cdr colors) color (car colors)))
- ;; Modifying color mappings means realized faces don't
- ;; use the right colors, so clear them.
- (clear-face-cache)))
+ ;; Modifying color mappings means realized faces don't use the
+ ;; right colors, so clear them, if we modified colors on a TTY
+ ;; frame.
+ (or (display-graphic-p)
+ (clear-face-cache))))
(defun tty-color-canonicalize (color)
"Return COLOR in canonical form.