From 5a9937beb6347b330ddbb942c9c6f7ce1abb67c9 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 13 Apr 2019 11:01:39 +0300 Subject: [PATCH] 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 . (Bug#35062) --- src/xterm.c | 9 +++++---- 1 file 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; -- 2.39.2