summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_interface.c
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2005-08-24 01:09:33 +0000
committerjsorg71 <jsorg71>2005-08-24 01:09:33 +0000
commit7d891a1bde2f8287f333fda9acc88310d783da73 (patch)
tree5202a565b2bee120ed075a0cac95221b3f1e0427 /xrdp/xrdp_interface.c
parent1881c8b1b847ef0de1c42f635ee9e10b99b5863e (diff)
downloadxrdp-proprietary-7d891a1bde2f8287f333fda9acc88310d783da73.tar.gz
xrdp-proprietary-7d891a1bde2f8287f333fda9acc88310d783da73.zip
added server_reset(which uses demand_active) for resizing the rdp client
Diffstat (limited to 'xrdp/xrdp_interface.c')
-rw-r--r--xrdp/xrdp_interface.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/xrdp/xrdp_interface.c b/xrdp/xrdp_interface.c
index b7cd1760..0d1264b8 100644
--- a/xrdp/xrdp_interface.c
+++ b/xrdp/xrdp_interface.c
@@ -372,3 +372,42 @@ server_draw_text(struct xrdp_mod* mod, int font,
box_right, box_bottom,
x, y, data, data_len);
}
+
+/*****************************************************************************/
+int DEFAULT_CC
+server_reset(struct xrdp_mod* mod, int width, int height, int bpp)
+{
+ struct xrdp_wm* wm;
+
+ wm = (struct xrdp_wm*)mod->wm;
+ if (wm->client_info == 0)
+ {
+ return 1;
+ }
+ /* older client can't resize */
+ if (wm->client_info->build <= 419)
+ {
+ return 0;
+ }
+ /* if same, don't need to do anything */
+ if (wm->client_info->width == width &&
+ wm->client_info->height == height &&
+ wm->client_info->bpp == bpp)
+ {
+ return 0;
+ }
+ /* reset lib, client_info gets updated in libxrdp_reset */
+ if (libxrdp_reset(wm->session, width, height, bpp) != 0)
+ {
+ return 1;
+ }
+ /* reset cache */
+ xrdp_cache_reset(wm->cache, wm->client_info);
+ /* resize the main window */
+ xrdp_bitmap_resize(wm->screen, wm->client_info->width,
+ wm->client_info->height);
+ /* load some stuff */
+ xrdp_wm_load_static_colors(wm);
+ xrdp_wm_load_static_pointers(wm);
+ return 0;
+}