summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2019-04-13 11:01:39 +0300
committerEli Zaretskii <eliz@gnu.org>2019-04-13 11:01:39 +0300
commit5a9937beb6347b330ddbb942c9c6f7ce1abb67c9 (patch)
tree5a4adfb7c0c5c7b9aef82791b637d9844f29b8b7
parentd82d4fb9157dd86359e4489c8da100943754a4d0 (diff)
downloademacs-5a9937beb6347b330ddbb942c9c6f7ce1abb67c9.tar.gz
Minor cleanup in 'x_set_frame_alpha'
* src/xterm.c (x_set_frame_alpha): Remove redundant parts of testing of value of 'alpha'. Suggested by Konstantin Kharlamov <Hi-Angel@yandex.ru>. (Bug#35062)
-rw-r--r--src/xterm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 5aa3e3ff25c..def6915d62e 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -922,16 +922,17 @@ x_set_frame_alpha (struct frame *f)
else
alpha = f->alpha[1];
+ if (alpha < 0.0)
+ return;
+
if (FLOATP (Vframe_alpha_lower_limit))
alpha_min = XFLOAT_DATA (Vframe_alpha_lower_limit);
else if (FIXNUMP (Vframe_alpha_lower_limit))
alpha_min = (XFIXNUM (Vframe_alpha_lower_limit)) / 100.0;
- if (alpha < 0.0)
- return;
- else if (alpha > 1.0)
+ if (alpha > 1.0)
alpha = 1.0;
- else if (0.0 <= alpha && alpha < alpha_min && alpha_min <= 1.0)
+ else if (alpha < alpha_min && alpha_min <= 1.0)
alpha = alpha_min;
opac = alpha * OPAQUE;