Revision 30f6da66

b/hw/qxl.c
236 236
void qxl_spice_reset_cursor(PCIQXLDevice *qxl)
237 237
{
238 238
    qxl->ssd.worker->reset_cursor(qxl->ssd.worker);
239
    qemu_mutex_lock(&qxl->track_lock);
240
    qxl->guest_cursor = 0;
241
    qemu_mutex_unlock(&qxl->track_lock);
239 242
}
240 243

  
241 244

  
......
400 403
    {
401 404
        QXLCursorCmd *cmd = qxl_phys2virt(qxl, ext->cmd.data, ext->group_id);
402 405
        if (cmd->type == QXL_CURSOR_SET) {
406
            qemu_mutex_lock(&qxl->track_lock);
403 407
            qxl->guest_cursor = ext->cmd.data;
408
            qemu_mutex_unlock(&qxl->track_lock);
404 409
        }
405 410
        break;
406 411
    }
......
1065 1070

  
1066 1071
    d->mode = QXL_MODE_UNDEFINED;
1067 1072
    qemu_spice_destroy_primary_surface(&d->ssd, 0, async);
1073
    qxl_spice_reset_cursor(d);
1068 1074
    return 1;
1069 1075
}
1070 1076

  
......
1704 1710
            cmds[out].group_id = MEMSLOT_GROUP_GUEST;
1705 1711
            out++;
1706 1712
        }
1707
        cmds[out].cmd.data = d->guest_cursor;
1708
        cmds[out].cmd.type = QXL_CMD_CURSOR;
1709
        cmds[out].group_id = MEMSLOT_GROUP_GUEST;
1710
        out++;
1713
        if (d->guest_cursor) {
1714
            cmds[out].cmd.data = d->guest_cursor;
1715
            cmds[out].cmd.type = QXL_CMD_CURSOR;
1716
            cmds[out].group_id = MEMSLOT_GROUP_GUEST;
1717
            out++;
1718
        }
1711 1719
        qxl_spice_loadvm_commands(d, cmds, out);
1712 1720
        g_free(cmds);
1713 1721

  

Also available in: Unified diff