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; }
void xf_sw_desktop_resize(rdpContext* context) { xfInfo* xfi; rdpSettings* settings; xfi = ((xfContext*) context)->xfi; settings = xfi->instance->settings; xf_lock_x11(xfi, TRUE); if (xfi->fullscreen != TRUE) { rdpGdi* gdi = context->gdi; gdi_resize(gdi, xfi->width, xfi->height); if (xfi->image) { xfi->image->data = NULL; XDestroyImage(xfi->image); xfi->image = XCreateImage(xfi->display, xfi->visual, xfi->depth, ZPixmap, 0, (char*) gdi->primary_buffer, gdi->width, gdi->height, xfi->scanline_pad, 0); } } xf_unlock_x11(xfi, TRUE); }
void wf_sw_desktop_resize(rdpContext* context) { wfInfo* wfi; rdpGdi* gdi; rdpSettings* settings; wfi = ((wfContext*) context)->wfi; settings = wfi->instance->settings; gdi = context->gdi; wfi->width = settings->DesktopWidth; wfi->height = settings->DesktopHeight; gdi_resize(gdi, wfi->width, wfi->height); if (wfi->primary) { wf_image_free(wfi->primary); wfi->primary = wf_image_new(wfi, wfi->width, wfi->height, wfi->dstBpp, gdi->primary_buffer); } }
void xf_desktop_resize(rdpUpdate* update) { GDI* gdi; xfInfo* xfi; boolean same; rdpSettings* settings; xfi = GET_XFI(update); gdi = GET_GDI(update); settings = xfi->instance->settings; if (!xfi->fullscreen) { xfi->width = settings->width; xfi->height = settings->height; if (xfi->window) xf_ResizeDesktopWindow(xfi, xfi->window, settings->width, settings->height); if (xfi->primary) { same = (xfi->primary == xfi->drawing ? True : False); XFreePixmap(xfi->display, xfi->primary); xfi->primary = XCreatePixmap(xfi->display, DefaultRootWindow(xfi->display), xfi->width, xfi->height, xfi->depth); if (same) xfi->drawing = xfi->primary; } if (gdi) gdi_resize(gdi, xfi->width, xfi->height); if (gdi && xfi->image) { xfi->image->data = NULL; XDestroyImage(xfi->image); xfi->image = XCreateImage(xfi->display, xfi->visual, xfi->depth, ZPixmap, 0, (char*) gdi->primary_buffer, gdi->width, gdi->height, xfi->scanline_pad, 0); } } }
void xf_sw_desktop_resize(rdpUpdate* update) { xfInfo* xfi; rdpSettings* settings; xfi = GET_XFI(update); settings = xfi->instance->settings; if (xfi->fullscreen != True) { GDI* gdi = GET_GDI(update); gdi_resize(gdi, xfi->width, xfi->height); if (xfi->image) { xfi->image->data = NULL; XDestroyImage(xfi->image); xfi->image = XCreateImage(xfi->display, xfi->visual, xfi->depth, ZPixmap, 0, (char*) gdi->primary_buffer, gdi->width, gdi->height, xfi->scanline_pad, 0); } } }
void xf_sw_desktop_resize(rdpContext* context) { rdpGdi* gdi = context->gdi; xfContext* xfc = (xfContext*) context; xf_lock_x11(xfc, TRUE); if (!xfc->fullscreen) { gdi_resize(gdi, xfc->width, xfc->height); if (xfc->image) { xfc->image->data = NULL; XDestroyImage(xfc->image); xfc->image = XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap, 0, (char*) gdi->primary_buffer, gdi->width, gdi->height, xfc->scanline_pad, 0); } } xf_unlock_x11(xfc, TRUE); }