[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: screen-gamma not always effective?
From: |
Chong Yidong |
Subject: |
Re: screen-gamma not always effective? |
Date: |
Sat, 10 Feb 2007 14:58:25 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) |
> In all cases I am seeing the same effect: those parts of the screen
> showing text are displayed in the gamma corrected colour, the other
> parts of the screen remain remain in the brighter uncorrected colour.
>
> Well, that suggests that some places in Emacs are using the specified
> color without calling gamma_correct first.
Does this patch fix the problem?
*** emacs/src/frame.c.~1.337.~ 2007-02-06 17:40:47.000000000 -0500
--- emacs/src/frame.c 2007-02-10 14:46:17.000000000 -0500
***************
*** 3058,3065 ****
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));
else
signal_error ("Invalid screen-gamma", new_value);
--- 3058,3068 ----
if (NILP (new_value))
f->gamma = 0;
else if (NUMBERP (new_value) && XFLOATINT (new_value) > 0)
! {
! 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);