From: Eli Zaretskii Date: Sat, 13 Apr 2019 08:01:39 +0000 (+0300) Subject: Minor cleanup in 'x_set_frame_alpha' X-Git-Tag: emacs-27.0.90~3259^2~14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5a9937beb6347b330ddbb942c9c6f7ce1abb67c9;p=emacs.git 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) --- 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;