[Spice-devel] [spice-gtk] Use cursor->data instead of row data
Marc-André Lureau
marcandre.lureau at redhat.com
Wed May 31 09:19:23 UTC 2017
----- Original Message -----
> data and cursor->data contains the same data (see the memcpy
> above) but data is not aligned to uint32_t and require also
> additional casts. Using cursor->data avoid these issues.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
looks good, ack
> ---
> src/channel-cursor.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/channel-cursor.c b/src/channel-cursor.c
> index cddba03..2610660 100644
> --- a/src/channel-cursor.c
> +++ b/src/channel-cursor.c
> @@ -422,7 +422,7 @@ static display_cursor *set_cursor(SpiceChannel *channel,
> SpiceCursor *scursor)
> memcpy(cursor->data, data, size);
> for (i = 0; i < hdr->width * hdr->height; i++) {
> pix_mask = get_pix_mask(data, size, i);
> - if (pix_mask && *((guint32*)data + i) == 0xffffff) {
> + if (pix_mask && cursor->data[i] == 0xffffff) {
> cursor->data[i] = get_pix_hack(i, hdr->width);
> } else {
> cursor->data[i] |= (pix_mask ? 0 : 0xff000000);
> --
> 2.9.4
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
>
More information about the Spice-devel
mailing list