spice: prepare for upcoming spice-server change
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 12 Oct 2018 11:45:51 +0000 (13:45 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 29 Oct 2018 13:38:17 +0000 (14:38 +0100)
commit9c956e646178fee8c14ce7dfae5a9d7cb901876c
tree9ede3776cae814f7b7fa0494a42579e3ba34a61c
parent8c2b816fc5bf9d30138ac068d1665e473c7cb4bf
spice: prepare for upcoming spice-server change

Future spice-server versions will call the client_monitors_config
callback with the monitors list filtered to only include the monitors
of the given display channel (aka QXLInstance).  Luckily this is easily
detectable at runtime, so we can prepare for that in advance and also
make qemu compatible with both old and new spice-server versions.

While being at it also use the console index instead of head number as
array index.  The later doesn't work correctly in case multiple display
devices are present.

Cc: spice-devel@lists.freedesktop.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Lukáš Hrázký <lhrazky@redhat.com>
Message-id: 20181012114551.28809-1-kraxel@redhat.com
ui/spice-display.c