From e0fc7297f5bd0c4297e6b6b8ca2d7cd80251b1c9 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Sun, 13 May 2012 13:56:15 -0700 Subject: pass the client_info(caps) on to module and xserver --- xup/xup.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'xup/xup.c') diff --git a/xup/xup.c b/xup/xup.c index 449ec5f7..28c1b50c 100644 --- a/xup/xup.c +++ b/xup/xup.c @@ -248,7 +248,7 @@ lib_mod_connect(struct mod* mod) out_uint32_le(s, mod->width); out_uint32_le(s, mod->height); out_uint32_le(s, mod->bpp); - out_uint32_le(s, mod->rfx); /* send rfx flag */ + out_uint32_le(s, 0); s_mark_end(s); len = (int)(s->end - s->data); s_pop_layer(s, iso_hdr); @@ -471,6 +471,29 @@ lib_mod_process_orders(struct mod* mod, int type, struct stream* s) } +/******************************************************************************/ +/* return error */ +static int APP_CC +lib_send_client_info(struct mod* mod) +{ + struct stream* s; + int len; + + make_stream(s); + init_stream(s, 8192); + s_push_layer(s, iso_hdr, 4); + out_uint16_le(s, 104); + g_memcpy(s->p, &(mod->client_info), sizeof(mod->client_info)); + s->p += sizeof(mod->client_info); + s_mark_end(s); + len = (int)(s->end - s->data); + s_pop_layer(s, iso_hdr); + out_uint32_le(s, len); + lib_send(mod, s->data, len); + free_stream(s); + return 0; +} + /******************************************************************************/ /* return error */ int DEFAULT_CC @@ -531,6 +554,7 @@ lib_mod_signal(struct mod* mod) } s->p = phold + len; } + lib_send_client_info(mod); } } else if (type == 3) /* order list with len after type */ @@ -592,10 +616,9 @@ lib_mod_set_param(struct mod* mod, char* name, char* value) { g_strncpy(mod->port, value, 255); } - else if (g_strcasecmp(name, "rfx") == 0) + else if (g_strcasecmp(name, "client_info") == 0) { - mod->rfx = g_atoi(value); - g_writeln("mod->rfx = %d", mod->rfx); + g_memcpy(&(mod->client_info), value, sizeof(mod->client_info)); } return 0; } -- cgit v1.2.1