diff options
| author | Chong Yidong | 2008-11-12 15:51:11 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-11-12 15:51:11 +0000 |
| commit | 2f8e69cccae47fcf95e3b4157457456e4147f78a (patch) | |
| tree | 78e841fa210304fc59da9d06b7a1afd8a2b7264e /src | |
| parent | 7e849c1743c9abefcbe5d244544830cf93a19019 (diff) | |
| download | emacs-2f8e69cccae47fcf95e3b4157457456e4147f78a.tar.gz emacs-2f8e69cccae47fcf95e3b4157457456e4147f78a.zip | |
(x_set_frame_alpha): Do nothing if alpha is negative.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.c | 4 | ||||
| -rw-r--r-- | src/xterm.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/w32term.c b/src/w32term.c index 7201455e1ff..3e73ceba428 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -439,7 +439,9 @@ x_set_frame_alpha (f) | |||
| 439 | else if (INTEGERP (Vframe_alpha_lower_limit)) | 439 | else if (INTEGERP (Vframe_alpha_lower_limit)) |
| 440 | alpha_min = (XINT (Vframe_alpha_lower_limit)) / 100.0; | 440 | alpha_min = (XINT (Vframe_alpha_lower_limit)) / 100.0; |
| 441 | 441 | ||
| 442 | if (alpha < 0.0 || 1.0 < alpha) | 442 | if (alpha < 0.0) |
| 443 | return; | ||
| 444 | else if (alpha > 1.0) | ||
| 443 | alpha = 1.0; | 445 | alpha = 1.0; |
| 444 | else if (alpha < alpha_min && alpha_min <= 1.0) | 446 | else if (alpha < alpha_min && alpha_min <= 1.0) |
| 445 | alpha = alpha_min; | 447 | alpha = alpha_min; |
diff --git a/src/xterm.c b/src/xterm.c index eef22a51443..2a0f783580e 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -487,7 +487,9 @@ x_set_frame_alpha (f) | |||
| 487 | else if (INTEGERP (Vframe_alpha_lower_limit)) | 487 | else if (INTEGERP (Vframe_alpha_lower_limit)) |
| 488 | alpha_min = (XINT (Vframe_alpha_lower_limit)) / 100.0; | 488 | alpha_min = (XINT (Vframe_alpha_lower_limit)) / 100.0; |
| 489 | 489 | ||
| 490 | if (alpha < 0.0 || 1.0 < alpha) | 490 | if (alpha < 0.0) |
| 491 | return; | ||
| 492 | else if (alpha > 1.0) | ||
| 491 | alpha = 1.0; | 493 | alpha = 1.0; |
| 492 | else if (0.0 <= alpha && alpha < alpha_min && alpha_min <= 1.0) | 494 | else if (0.0 <= alpha && alpha < alpha_min && alpha_min <= 1.0) |
| 493 | alpha = alpha_min; | 495 | alpha = alpha_min; |