Handle the new QXLCursorHeader type

This commit is contained in:
Alexander Larsson 2010-07-08 13:24:15 +02:00
parent aa3d3db9f4
commit 3c0329d27f

View File

@ -6391,7 +6391,12 @@ static void fill_cursor(CursorChannel *cursor_channel, SpiceCursor *red_cursor,
qxl_cursor = (QXLCursor *)get_virt(&channel->worker->mem_slots, cursor_cmd->u.set.shape,
sizeof(QXLCursor), cursor->group_id);
red_cursor->flags = 0;
red_cursor->header = qxl_cursor->header;
red_cursor->header.unique = qxl_cursor->header.unique;
red_cursor->header.type = qxl_cursor->header.type;
red_cursor->header.width = qxl_cursor->header.width;
red_cursor->header.height = qxl_cursor->header.height;
red_cursor->header.hot_spot_x = qxl_cursor->header.hot_spot_x;
red_cursor->header.hot_spot_y = qxl_cursor->header.hot_spot_y;
if (red_cursor->header.unique) {
if (red_cursor_cache_find(cursor_channel, red_cursor->header.unique)) {
@ -9964,7 +9969,7 @@ typedef struct __attribute__ ((__packed__)) CursorData {
SpiceCursor _cursor;
} CursorData;
static LocalCursor *_new_local_cursor(SpiceCursorHeader *header, int data_size, SpicePoint16 position)
static LocalCursor *_new_local_cursor(QXLCursorHeader *header, int data_size, SpicePoint16 position)
{
LocalCursor *local;
@ -9974,8 +9979,13 @@ static LocalCursor *_new_local_cursor(SpiceCursorHeader *header, int data_size,
local->base.refs = 1;
local->base.type = CURSOR_TYPE_LOCAL;
local->red_cursor.header = *header;
local->red_cursor.header.unique = 0;
local->red_cursor.header.type = header->type;
local->red_cursor.header.width = header->width;
local->red_cursor.header.height = header->height;
local->red_cursor.header.hot_spot_x = header->hot_spot_x;
local->red_cursor.header.hot_spot_y = header->hot_spot_y;
local->red_cursor.flags = 0;
local->position = position;
local->data_size = data_size;