diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2014-01-24 18:47:20 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-03-10 13:55:25 +0100 |
commit | 9b74d0d598b022e558d06bf6d57f0f303d1a4bc8 (patch) | |
tree | 709c76645c3ab65f5e8f958363632eab6be26220 | |
parent | 4b87dc4c9729aaa77737d2f20c255231f4edb526 (diff) |
spice: QemuUIInfo windup
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | ui/spice-display.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/ui/spice-display.c b/ui/spice-display.c index 2a1fbda7bc..e28698c6b6 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -543,10 +543,29 @@ static void interface_set_client_capabilities(QXLInstance *sin, } static int interface_client_monitors_config(QXLInstance *sin, - VDAgentMonitorsConfig *monitors_config) + VDAgentMonitorsConfig *mc) { - dprint(3, "%s:\n", __func__); - return 0; /* == not supported by guest */ + SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl); + QemuUIInfo info; + int rc; + + /* + * FIXME: multihead is tricky due to the way + * spice has multihead implemented. + */ + memset(&info, 0, sizeof(info)); + if (mc->num_of_monitors > 0) { + 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; + } } static const QXLInterface dpy_interface = { |