From: Chong Yidong Date: Mon, 12 Feb 2007 18:13:00 +0000 (+0000) Subject: (x_set_screen_gamma): Clear face cache. X-Git-Tag: emacs-pretest-22.0.94~268 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bc4dcc2cb8ad877b77a5f2c6ef5a0b8856f1eedc;p=emacs.git (x_set_screen_gamma): Clear face cache. --- diff --git a/src/frame.c b/src/frame.c index c7ec3dda3b4..f2b7c514cf3 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3058,8 +3058,11 @@ x_set_screen_gamma (f, new_value, old_value) if (NILP (new_value)) f->gamma = 0; else if (NUMBERP (new_value) && XFLOATINT (new_value) > 0) - /* The value 0.4545 is the normal viewing gamma. */ - f->gamma = 1.0 / (0.4545 * XFLOATINT (new_value)); + { + Fclear_face_cache (Qnil); + /* The value 0.4545 is the normal viewing gamma. */ + f->gamma = 1.0 / (0.4545 * XFLOATINT (new_value)); + } else signal_error ("Invalid screen-gamma", new_value);