Block cursor should not be affected by background_opacity

This commit is contained in:
Kovid Goyal 2017-11-23 22:49:27 +05:30
parent e1c553e7b2
commit a3b85883f8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -178,6 +178,8 @@ void main() {
#if defined(TRANSPARENT) && !defined(SPECIAL)
// If the background color is default, set its opacity to background_opacity, otherwise it should be opaque
bg_alpha = step(0.5, float(colors[bg_index] & BYTE_MASK));
// Cursor must not be affected by background_opacity
bg_alpha = mix(bg_alpha, 1.0, cursor);
bg_alpha = bg_alpha + (1.0f - bg_alpha) * background_opacity;
#endif