[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: winex11: Add support for animated cursors in X11 driver (try 4).
From:       Alexandre Julliard <julliard () winehq ! org>
Date:       2010-09-30 14:06:12
Message-ID: 877hi32unf.fsf () wine ! dyndns ! org
[Download RAW message or body]

Erich Hoover <ehoover@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@winehq.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic