aboutsummaryrefslogtreecommitdiff
path: root/ui/spice-display.c
diff options
context:
space:
mode:
authorLukáš Hrázký <lhrazky@redhat.com>2019-02-15 16:09:19 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-02-21 10:15:26 +0100
commitbe812c0ab7d5ab741d0d87387a75a0e8bb6461e7 (patch)
tree959ce08f264bffbca326c650138ffe8194cdde2a /ui/spice-display.c
parent35921860156e39f17ffd7e18d0f84d2396a6e8f4 (diff)
spice: set device address and device display ID in QXL interface
Calls the new SPICE QXL interface function spice_qxl_set_device_info to set the hardware address of the graphics device represented by the QXL interface (e.g. a PCI path) and the device display IDs (the IDs of the device's monitors that belong to this QXL interface). Also stops using the deprecated spice_qxl_set_max_monitors, the new interface function replaces it. Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Message-Id: <20190215150919.8263-1-lhrazky@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/spice-display.c')
-rw-r--r--ui/spice-display.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ui/spice-display.c b/ui/spice-display.c
index aea6f6ebce..a5e26479a8 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -1147,6 +1147,17 @@ static void qemu_spice_display_init_one(QemuConsole *con)
ssd->qxl.base.sif = &dpy_interface.base;
qemu_spice_add_display_interface(&ssd->qxl, con);
+
+#if SPICE_SERVER_VERSION >= 0x000e02 /* release 0.14.2 */
+ char device_address[256] = "";
+ if (qemu_spice_fill_device_address(con, device_address, 256)) {
+ spice_qxl_set_device_info(&ssd->qxl,
+ device_address,
+ qemu_console_get_head(con),
+ 1);
+ }
+#endif
+
qemu_spice_create_host_memslot(ssd);
register_displaychangelistener(&ssd->dcl);