diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-11-12 15:52:12 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-11-12 15:52:12 +0000 |
commit | 62e62ea8662b533692802ff72ac5156dba9b4d4a (patch) | |
tree | bc2f63869e0a01d7783acefb112d6d4cea0c03a6 /src/frame.c | |
parent | f2d5c00fe8a2ab41916c3aec7bf83bf5b3bb3bdb (diff) | |
download | emacs-62e62ea8662b533692802ff72ac5156dba9b4d4a.tar.gz |
(x_set_alpha): Set alpha to -1 if nil given.
Diffstat (limited to 'src/frame.c')
-rw-r--r-- | src/frame.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/frame.c b/src/frame.c index 6704e9f67c2..722cf2f96a9 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3654,25 +3654,24 @@ x_set_alpha (f, arg, oldval) else item = arg; - if (! NILP (item)) - { - if (FLOATP (item)) - { - alpha = XFLOAT_DATA (item); - if (alpha < 0.0 || 1.0 < alpha) - args_out_of_range (make_float (0.0), make_float (1.0)); - } - else if (INTEGERP (item)) - { - ialpha = XINT (item); - if (ialpha < 0 || 100 < ialpha) - args_out_of_range (make_number (0), make_number (100)); - else - alpha = ialpha / 100.0; - } - else - wrong_type_argument (Qnumberp, item); - } + if (NILP (item)) + alpha = - 1.0; + else if (FLOATP (item)) + { + alpha = XFLOAT_DATA (item); + if (alpha < 0.0 || 1.0 < alpha) + args_out_of_range (make_float (0.0), make_float (1.0)); + } + else if (INTEGERP (item)) + { + ialpha = XINT (item); + if (ialpha < 0 || 100 < ialpha) + args_out_of_range (make_number (0), make_number (100)); + else + alpha = ialpha / 100.0; + } + else + wrong_type_argument (Qnumberp, item); newval[i] = alpha; } |