summary refs log tree commit diff stats
path: root/hw/display/qxl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-10-11 22:39:59 +0200
committerGerd Hoffmann <kraxel@redhat.com>2013-10-17 12:42:54 +0200
commit9fa032866daae68357d99abc725c18fe9ed4b61b (patch)
tree759b86785e2a11fcd65c743b8afaf25ec725635e /hw/display/qxl.c
parent35b2122db446a03be9b88f540e865930efd01d6a (diff)
downloadfocaccia-qemu-9fa032866daae68357d99abc725c18fe9ed4b61b.tar.gz
focaccia-qemu-9fa032866daae68357d99abc725c18fe9ed4b61b.zip
spice: fix multihead support
This patch fixes spice display initialization to handle
multihead properly.

spice-core now keeps track of which QemuConsole has a spice
display channel attached to it and which has not.  It also
manages display channel ids.

spice-display looks at all QemuConsoles and will pick up any
graphic console not yet bound to a spice channel (which in practice
are all non-qxl graphic devices).

Result is that
 (a) you'll get a spice client window for each graphical device
     now (first only without this patch), and
 (b) mixing qxl and non-qxl vga cards works properly.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display/qxl.c')
-rw-r--r--hw/display/qxl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 074ed43e27..c2cea1ce88 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -2037,8 +2037,7 @@ static int qxl_init_common(PCIQXLDevice *qxl)
            qxl->vram32_size < qxl->vram_size ? "[region 4]" : "[unmapped]");
 
     qxl->ssd.qxl.base.sif = &qxl_interface.base;
-    qxl->ssd.qxl.id = qxl->id;
-    if (qemu_spice_add_interface(&qxl->ssd.qxl.base) != 0) {
+    if (qemu_spice_add_display_interface(&qxl->ssd.qxl, qxl->vga.con) != 0) {
         error_report("qxl interface %d.%d not supported by spice-server",
                      SPICE_INTERFACE_QXL_MAJOR, SPICE_INTERFACE_QXL_MINOR);
         return -1;