Exemple #1
0
BOOL xf_sw_desktop_resize(rdpContext* context)
{
	rdpGdi* gdi = context->gdi;
	xfContext* xfc = (xfContext*) context;
	BOOL ret = FALSE;

	xf_lock_x11(xfc, TRUE);

	xfc->sessionWidth = context->settings->DesktopWidth;
	xfc->sessionHeight = context->settings->DesktopHeight;

	if (!gdi_resize(gdi, xfc->sessionWidth, xfc->sessionHeight))
		goto out;

	if (xfc->image)
	{
		xfc->image->data = NULL;
		XDestroyImage(xfc->image);

		if (!(xfc->image = XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap, 0,
				(char*) gdi->primary_buffer, gdi->width, gdi->height, xfc->scanline_pad, 0)))
		{
			goto out;
		}
	}

	ret = xf_desktop_resize(context);

out:
	xf_unlock_x11(xfc, TRUE);
	return ret;
}
Exemple #2
0
void xf_hw_desktop_resize(rdpContext* context)
{
	xfContext* xfc = (xfContext*) context;
	rdpSettings* settings = xfc->settings;

	xf_lock_x11(xfc, TRUE);

	xfc->sessionWidth = settings->DesktopWidth;
	xfc->sessionHeight = settings->DesktopHeight;

	xf_desktop_resize(context);

	xf_unlock_x11(xfc, TRUE);
}