mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 23:14:55 +02:00
Fix window icon not working on X11 with 64bits
Apparently on X11 the maximum icon size is 128x128. 256x256 is too large for the X11 protocol because the X server unserializes the icons using "unsigned long" which is 64 bits on Linux. So we have to use 64bits per pixel instead of 32, with 32bits padded to 0. While there I also got rid of the kitty.rgba file replacing it with a 128x128 PNG file. Fixes #3260
This commit is contained in:
BIN
logo/kitty-128.png
Normal file
BIN
logo/kitty-128.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
BIN
logo/kitty.rgba
BIN
logo/kitty.rgba
Binary file not shown.
@@ -29,7 +29,6 @@ def render(output, sz=256):
|
||||
|
||||
def main():
|
||||
render(abspath('kitty.png'))
|
||||
run('convert', abspath('kitty.png'), '-depth', '8', abspath('kitty.rgba'))
|
||||
iconset = abspath('kitty.iconset')
|
||||
if os.path.exists(iconset):
|
||||
shutil.rmtree(iconset)
|
||||
@@ -39,6 +38,8 @@ def main():
|
||||
iname = os.path.join(iconset, 'icon_{0}x{0}.png'.format(sz))
|
||||
iname2x = 'icon_{0}x{0}@2x.png'.format(sz // 2)
|
||||
render(iname, sz)
|
||||
if sz == 128:
|
||||
shutil.copyfile(iname, abspath('kitty-128.png'))
|
||||
if sz > 16 and sz != 128:
|
||||
shutil.copy2(iname, iname2x)
|
||||
if sz in (64, 1024):
|
||||
|
||||
Reference in New Issue
Block a user