aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2008-11-12 15:52:12 +0000
committerChong Yidong2008-11-12 15:52:12 +0000
commit62e62ea8662b533692802ff72ac5156dba9b4d4a (patch)
treebc2f63869e0a01d7783acefb112d6d4cea0c03a6 /src
parentf2d5c00fe8a2ab41916c3aec7bf83bf5b3bb3bdb (diff)
downloademacs-62e62ea8662b533692802ff72ac5156dba9b4d4a.tar.gz
emacs-62e62ea8662b533692802ff72ac5156dba9b4d4a.zip
(x_set_alpha): Set alpha to -1 if nil given.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c37
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)
3654 else 3654 else
3655 item = arg; 3655 item = arg;
3656 3656
3657 if (! NILP (item)) 3657 if (NILP (item))
3658 { 3658 alpha = - 1.0;
3659 if (FLOATP (item)) 3659 else if (FLOATP (item))
3660 { 3660 {
3661 alpha = XFLOAT_DATA (item); 3661 alpha = XFLOAT_DATA (item);
3662 if (alpha < 0.0 || 1.0 < alpha) 3662 if (alpha < 0.0 || 1.0 < alpha)
3663 args_out_of_range (make_float (0.0), make_float (1.0)); 3663 args_out_of_range (make_float (0.0), make_float (1.0));
3664 } 3664 }
3665 else if (INTEGERP (item)) 3665 else if (INTEGERP (item))
3666 { 3666 {
3667 ialpha = XINT (item); 3667 ialpha = XINT (item);
3668 if (ialpha < 0 || 100 < ialpha) 3668 if (ialpha < 0 || 100 < ialpha)
3669 args_out_of_range (make_number (0), make_number (100)); 3669 args_out_of_range (make_number (0), make_number (100));
3670 else 3670 else
3671 alpha = ialpha / 100.0; 3671 alpha = ialpha / 100.0;
3672 } 3672 }
3673 else 3673 else
3674 wrong_type_argument (Qnumberp, item); 3674 wrong_type_argument (Qnumberp, item);
3675 }
3676 newval[i] = alpha; 3675 newval[i] = alpha;
3677 } 3676 }
3678 3677