How this impacts libmatoya: Previously, cursor images were always assumed to be 1:1 with display pixels (no scaling). Now when the app sends the cursor to libmatoya, it is passing the cursor scale parameter as a private PNG tag at the end of the PNG cursor object. On macOS, we need the MTY_AppSetPNGCursor function to apply that scale parameter to the NSImage object that it creates from the PNG cursor image so it will get rendered at the proper scale. This PR implements that change. (Note that on Windows or Linux the final cursor scale is always 1x so this only matters on Mac).
This is a re-up of an older PR that was way out of date and closed.
This libmatoya PR is associated with the following PR in the Parsec app: https://github.com/parsec-cloud/parsec/pull/950
How this impacts libmatoya: Previously, cursor images were always assumed to be 1:1 with display pixels (no scaling). Now when the app sends the cursor to libmatoya, it is passing the cursor scale parameter as a private PNG tag at the end of the PNG cursor object. On macOS, we need the MTY_AppSetPNGCursor function to apply that scale parameter to the NSImage object that it creates from the PNG cursor image so it will get rendered at the proper scale. This PR implements that change. (Note that on Windows or Linux the final cursor scale is always 1x so this only matters on Mac).