summary refs log tree commit diff stats
path: root/ui/spice-core.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-07-22 15:34:12 +0200
committerGerd Hoffmann <kraxel@redhat.com>2013-07-30 10:25:47 +0200
commit58ae52a8dc7752e3da9a905678580b4cb8181cdc (patch)
tree9cca46e13c2b4e5bbe9a30ea6d484949bf882759 /ui/spice-core.c
parentdbe49aea76a7805f05b33d548b2e543b51fa8bb1 (diff)
downloadfocaccia-qemu-58ae52a8dc7752e3da9a905678580b4cb8181cdc.tar.gz
focaccia-qemu-58ae52a8dc7752e3da9a905678580b4cb8181cdc.zip
spice: fix display initialization
Spice has two display interface implementations:  One integrated into
the qxl graphics card, and one generic which can operate with every
qemu-emulated graphics card.

The generic one is activated in case spice is used without qxl.  The
logic for that only caught the "-vga qxl" case, "-device qxl-vga" goes
unnoticed.  Fix that by adding a check in the spice interface
registration so we'll notice the qxl card no matter how it is created.

https://bugzilla.redhat.com/show_bug.cgi?id=981094

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/spice-core.c')
-rw-r--r--ui/spice-core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 033fd8925b..bd7a248f91 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -48,6 +48,7 @@ static char *auth_passwd;
 static time_t auth_expires = TIME_MAX;
 static int spice_migration_completed;
 int using_spice = 0;
+int spice_displays;
 
 static QemuThread me;
 
@@ -836,6 +837,10 @@ int qemu_spice_add_interface(SpiceBaseInstance *sin)
         qemu_add_vm_change_state_handler(vm_change_state_handler, NULL);
     }
 
+    if (strcmp(sin->sif->type, SPICE_INTERFACE_QXL) == 0) {
+        spice_displays++;
+    }
+
     return spice_server_add_interface(spice_server, sin);
 }