aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/display/qxl-render.c4
-rw-r--r--ui/spice-core.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c
index cc2c2b1dbc..bcc5c3701a 100644
--- a/hw/display/qxl-render.c
+++ b/hw/display/qxl-render.c
@@ -138,7 +138,9 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl)
if (qemu_spice_rect_is_empty(qxl->dirty+i)) {
break;
}
- if (qxl->dirty[i].left > qxl->dirty[i].right ||
+ if (qxl->dirty[i].left < 0 ||
+ qxl->dirty[i].top < 0 ||
+ qxl->dirty[i].left > qxl->dirty[i].right ||
qxl->dirty[i].top > qxl->dirty[i].bottom ||
qxl->dirty[i].right > qxl->guest_primary.surface.width ||
qxl->dirty[i].bottom > qxl->guest_primary.surface.height) {
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 1a2fb4b237..17a2ed3782 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -853,7 +853,6 @@ int qemu_spice_add_interface(SpiceBaseInstance *sin)
}
static GSList *spice_consoles;
-static int display_id;
bool qemu_spice_have_display_interface(QemuConsole *con)
{
@@ -868,7 +867,7 @@ int qemu_spice_add_display_interface(QXLInstance *qxlin, QemuConsole *con)
if (g_slist_find(spice_consoles, con)) {
return -1;
}
- qxlin->id = display_id++;
+ qxlin->id = qemu_console_get_index(con);
spice_consoles = g_slist_append(spice_consoles, con);
return qemu_spice_add_interface(&qxlin->base);
}