[PATCH] Support for animated cursors

H. Verbeet hverbeet at gmail.com
Mon Aug 27 13:04:40 CDT 2007


On 27/08/07, Trent Waddington <trent.waddington at gmail.com> wrote:
> +ANIHEADER *anih = NULL;
> +LPBYTE *ani_frames = NULL;
> +DWORD ani_frame_idx = 0;
I don't think you want to be using global variables for that.

> -        USER_Driver->pSetCursor( (CURSORICONINFO*)GlobalLock16(HCURSOR_16(hCursor)) );
> +        CURSORICONINFO *info = (CURSORICONINFO*)GlobalLock16(HCURSOR_16(hCursor));
> +        if (info->hNext && !animate_timer_started) {
> +            animate_timer_started = TRUE;
> +            SetTimer(NULL, 0, 55, animate_cursor);
> +        }
> +
> +        USER_Driver->pSetCursor( info );
You should use the timing and frame sequence info from the .ani.
Also, Xcursor actually supports proper animated cursors, so it would
be better to handle the animation in winex11.drv

> @@ -156,6 +156,7 @@ typedef struct tagCURSORICONINFO
>      WORD    nWidthBytes;
>      BYTE    bPlanes;
>      BYTE    bBitsPerPixel;
> +    HICON16 hNext;
>  } CURSORICONINFO;
As explained in the comment at the top of cursoricon.c, you can't do
that, because it will break win16 applications.



More information about the wine-devel mailing list