Merge branch 'feat-titlebar-opt-err' of https://github.com/page-down/kitty

This commit is contained in:
Kovid Goyal 2021-12-21 15:25:57 +05:30
commit e49b20bfa7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -686,7 +686,11 @@ def titlebar_color(x: str) -> int:
return 0 return 0
if x == 'background': if x == 'background':
return 1 return 1
try:
return (color_as_int(to_color(x)) << 8) | 2 return (color_as_int(to_color(x)) << 8) | 2
except ValueError:
log_error(f'Ignoring invalid title bar color: {x}')
return 0
def macos_titlebar_color(x: str) -> int: def macos_titlebar_color(x: str) -> int: