diff --git a/debian/changelog b/debian/changelog index d8c4034..1f011b8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +steamos-compositor (1.34) brewmaster; urgency=medium + + * Small tweak to loadargb_cursor to better handle non-premult cursors + + -- Pierre-Loup A. Griffais Thu, 19 May 2016 15:52:35 -0700 + steamos-compositor (1.33) brewmaster; urgency=medium * Prefer HDMI/DP over other types of displays. (patch by Coucouf) diff --git a/src/loadargbcursor.c b/src/loadargbcursor.c index 4215e50..7449bdd 100644 --- a/src/loadargbcursor.c +++ b/src/loadargbcursor.c @@ -55,10 +55,20 @@ int main(int ac, char **av) while (i < image->w * image->h) { pixel = (pixel_t *)ptr; - tmppixel.r = pixel->b; - tmppixel.g = pixel->g; - tmppixel.b = pixel->r; - tmppixel.a = pixel->a; + tmppixel.a = pixel->a; + + if ( tmppixel.a != 0 ) + { + tmppixel.r = pixel->b; + tmppixel.g = pixel->g; + tmppixel.b = pixel->r; + } + else + { + tmppixel.r = 0; + tmppixel.g = 0; + tmppixel.b = 0; + } *pixel = tmppixel;