summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2008-11-12 15:52:12 +0000
committerChong Yidong <cyd@stupidchicken.com>2008-11-12 15:52:12 +0000
commit62e62ea8662b533692802ff72ac5156dba9b4d4a (patch)
treebc2f63869e0a01d7783acefb112d6d4cea0c03a6 /src/frame.c
parentf2d5c00fe8a2ab41916c3aec7bf83bf5b3bb3bdb (diff)
downloademacs-62e62ea8662b533692802ff72ac5156dba9b4d4a.tar.gz
(x_set_alpha): Set alpha to -1 if nil given.
Diffstat (limited to 'src/frame.c')
-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)
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;
}