From bc4dcc2cb8ad877b77a5f2c6ef5a0b8856f1eedc Mon Sep 17 00:00:00 2001
From: Chong Yidong <cyd@stupidchicken.com>
Date: Mon, 12 Feb 2007 18:13:00 +0000
Subject: [PATCH] (x_set_screen_gamma): Clear face cache.

---
 src/frame.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

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);
 
-- 
2.39.5