diff options
author | Jeremy White <jwhite@codeweavers.com> | 2016-07-06 14:12:22 -0500 |
---|---|---|
committer | Jeremy White <jwhite@codeweavers.com> | 2016-07-06 14:12:22 -0500 |
commit | 2073b73208ba7ce9a6b1558d7c68cf9f8bd29ca4 (patch) | |
tree | 627f119279b447558f0a32081cb21ec0603753a7 /src/spice.c | |
parent | aab9788aa86aa64b4f48818c34bb9cbb4dd82461 (diff) |
Handle screen size changes.
Diffstat (limited to 'src/spice.c')
-rw-r--r-- | src/spice.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/spice.c b/src/spice.c index 7e6c4ba..e7c0a07 100644 --- a/src/spice.c +++ b/src/spice.c @@ -314,6 +314,23 @@ static void update_area_complete(QXLInstance *qin, uint32_t surface_id, static int client_monitors_config(QXLInstance *qin, VDAgentMonitorsConfig *monitors_config) { + int i; + if (! monitors_config) + { + /* a NULL is used as a test to see if we support this function */ + g_debug("%s: NULL monitors_config", __func__); + return TRUE; + } + + g_debug("%s: [num %d|flags 0x%x]", __func__, monitors_config->num_of_monitors, monitors_config->flags); + for (i = 0; i < monitors_config->num_of_monitors; i++) + g_debug(" %d:[height %d|width %d|depth %d|x %d|y %d]", i, + monitors_config->monitors[i].height, + monitors_config->monitors[i].width, + monitors_config->monitors[i].depth, + monitors_config->monitors[i].x, + monitors_config->monitors[i].y); + g_debug("FIXME! UNIMPLEMENTED! %s", __func__); return FALSE; } @@ -453,6 +470,9 @@ int spice_create_primary(spice_t *s, int w, int h, int bytes_per_line, void *shm surface.format = SPICE_SURFACE_FMT_32_xRGB; surface.mem = (QXLPHYSICAL) shmaddr; + s->width = w; + s->height = h; + spice_qxl_create_primary_surface(&s->display_sin, 0, &surface); return send_monitors_config(s, w, h); |