Skip to content
  • LRN's avatar
    anicursorgen: change the PNG compression use logic · a6275c6c
    LRN authored and Jakub Steiner's avatar Jakub Steiner committed
    Previously anicursorgen used PNG compression for any
    cursor frames larger than 48x48, for no immediately
    apparent reason, even to me (the author of anicursorgen).
    
    Tests on Windows 10 revealed that this logic is faulty:
    Windows 10 does not recognize PNG-compressed frames as valid, thus
    all Adwaita cursors are effectively 32x32 and 48x48 (all larger
    frames are ignored by the OS). This becomes obvious in HiDPI mode,
    where the OS will try to use larger cursor sizes.
    
    Windows 10 loads up uncompressed cursors just fine, and
    stock Windows 10 cursors are uncompressed. However, animated
    cursors with large numbers of frames, when stored without
    compression, are also ignored by the OS (probably due to their
    massive size).
    
    My hypothesis is that the correct way of using PNG compression
    is to compress or not compress *all* frames, not just the large ones.
    However, verifying that requires more tests (or asking MS developers).
    
    In the end i've settled enabling PNG compression for all frames
    in animated cursors and disabling PNG compression for all frames
    in non-animated cursors. This works for Adwaita, and that's all we
    really need.
    a6275c6c