winex11: Add support for animated cursors in X11 driver (try 4).
Alexandre Julliard
julliard at winehq.org
Thu Sep 30 09:06:12 CDT 2010
Erich Hoover <ehoover at mines.edu> writes:
> + /* Build an X cursor out of all of the frames */
> + if (!(images = pXcursorImagesCreate( nFrames ))) goto cleanup;
> + for (images->nimage = 0; images->nimage < nFrames; images->nimage++)
> + images->images[images->nimage] = imgs[images->nimage];
> wine_tsx11_lock();
> - cursor = pXcursorImageLoadCursor( gdi_display, image );
> - pXcursorImageDestroy( image );
> + cursor = pXcursorImagesLoadCursor( gdi_display, images );
> wine_tsx11_unlock();
> + pXcursorImagesDestroy( images ); /* Note: XcursorImagesDestroy is called on each frame */
The note isn't clear, does it destroy the individual images or not?
Either way your cleanup code needs more work.
> +cleanup:
> + /* Cleanup all of the resources used to obtain the frame data */
> + if (imgs && !cursor)
> + {
> + int i;
> +
> + for (i = 0; i < nFrames; i++)
> + pXcursorImageDestroy( image );
And this can't possibly work.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list