From 4c603d985535b44d1a6806fe32e39326fd09d906 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Tue, 23 Aug 2011 19:27:12 -0700 Subject: [PATCH] X11rdp can resize sessions now --- sesman/session.c | 11 +++++++++++ xup/xup.c | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/sesman/session.c b/sesman/session.c index 36262ad6..8292482c 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -77,6 +77,17 @@ session_get_bydata(char* name, int width, int height, int bpp, int type) while (tmp != 0) { + if (type == SESMAN_SESSION_TYPE_XRDP) + { + /* only name need to match for X11rdp, it can resize */ + if (g_strncmp(name, tmp->item->name, 255) == 0 && + tmp->item->type == type) + { + /*THREAD-FIX release chain lock */ + lock_chain_release(); + return tmp->item; + } + } if (g_strncmp(name, tmp->item->name, 255) == 0 && tmp->item->width == width && tmp->item->height == height && diff --git a/xup/xup.c b/xup/xup.c index 4e1990ee..a7b904a2 100644 --- a/xup/xup.c +++ b/xup/xup.c @@ -202,6 +202,22 @@ lib_mod_connect(struct mod* mod) g_sleep(250); } if (error == 0) + { + init_stream(s, 8192); + s_push_layer(s, iso_hdr, 4); + out_uint16_le(s, 103); + out_uint32_le(s, 300); + out_uint32_le(s, mod->width); + out_uint32_le(s, mod->height); + out_uint32_le(s, mod->bpp); + out_uint32_le(s, 0); + 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); + } + if (error == 0) { init_stream(s, 8192); s_push_layer(s, iso_hdr, 4);