summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGerd Hoffmann2015-03-13 12:21:50 +0100
committerGerd Hoffmann2015-06-11 09:06:14 +0200
commit5a9259a0b5d6f9424f94539cd9c715b1d166d90c (patch)
treed69ea95b3338ba5c0c24c17f899353d582b5b15a /ui
parentspice-display: fix segfault in qemu_spice_create_update (diff)
downloadqemu-5a9259a0b5d6f9424f94539cd9c715b1d166d90c.tar.gz
qemu-5a9259a0b5d6f9424f94539cd9c715b1d166d90c.tar.xz
qemu-5a9259a0b5d6f9424f94539cd9c715b1d166d90c.zip
spice: ui_info tweaks
Use the new dpy_ui_info_supported function. Clarifies the control flow. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/spice-display.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 4e6356a967..cc4a6ce98d 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -661,7 +661,10 @@ static int interface_client_monitors_config(QXLInstance *sin,
{
SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
QemuUIInfo info;
- int rc;
+
+ if (!dpy_ui_info_supported(ssd->dcl.con)) {
+ return 0; /* == not supported by guest */
+ }
if (!mc) {
return 1;
@@ -676,14 +679,10 @@ static int interface_client_monitors_config(QXLInstance *sin,
info.width = mc->monitors[0].width;
info.height = mc->monitors[0].height;
}
- rc = dpy_set_ui_info(ssd->dcl.con, &info);
- dprint(1, "%s/%d: size %dx%d, rc %d <--- ==========================\n",
- __func__, ssd->qxl.id, info.width, info.height, rc);
- if (rc != 0) {
- return 0; /* == not supported by guest */
- } else {
- return 1;
- }
+ dpy_set_ui_info(ssd->dcl.con, &info);
+ dprint(1, "%s/%d: size %dx%d\n", __func__, ssd->qxl.id,
+ info.width, info.height);
+ return 1;
}
static const QXLInterface dpy_interface = {