コード例 #1
0
ファイル: xrdp_module.c プロジェクト: dlinz/xrdp-ng
int xrdp_server_reset(xrdpModule* mod, XRDP_MSG_RESET* msg)
{
	if (libxrdp_reset(mod->session, msg) != 0)
		return 0;

	return 0;
}
コード例 #2
0
ファイル: xrdp_mm.c プロジェクト: LawrenceK/xrdp
int DEFAULT_CC
server_reset(struct xrdp_mod* mod, int width, int height, int bpp)
{
  struct xrdp_wm* wm = (struct xrdp_wm *)NULL;

  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;
}