diff --git a/client/X11/xf_gdi.c b/client/X11/xf_gdi.c index 421306c50..6977513c7 100644 --- a/client/X11/xf_gdi.c +++ b/client/X11/xf_gdi.c @@ -334,8 +334,8 @@ void xf_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt) brush = &patblt->brush; xf_set_rop3(xfi, gdi_rop3_code(patblt->bRop)); - foreColor = freerdp_color_convert_rgb(patblt->foreColor, xfi->srcBpp, xfi->bpp, xfi->clrconv); - backColor = freerdp_color_convert_rgb(patblt->backColor, xfi->srcBpp, xfi->bpp, xfi->clrconv); + foreColor = freerdp_color_convert_rgb(patblt->foreColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); + backColor = freerdp_color_convert_rgb(patblt->backColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); if (brush->style == GDI_BS_SOLID) { @@ -438,7 +438,7 @@ void xf_gdi_opaque_rect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect) uint32 color; xfInfo* xfi = ((xfContext*) context)->xfi; - color = freerdp_color_convert_var(opaque_rect->color, xfi->srcBpp, xfi->bpp, xfi->clrconv); + color = freerdp_color_convert_var(opaque_rect->color, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); XSetFunction(xfi->display, xfi->gc, GXcopy); XSetFillStyle(xfi->display, xfi->gc, FillSolid); @@ -468,7 +468,7 @@ void xf_gdi_multi_opaque_rect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* mult DELTA_RECT* rectangle; xfInfo* xfi = ((xfContext*) context)->xfi; - color = freerdp_color_convert_var(multi_opaque_rect->color, xfi->srcBpp, xfi->bpp, xfi->clrconv); + color = freerdp_color_convert_var(multi_opaque_rect->color, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); XSetFunction(xfi->display, xfi->gc, GXcopy); XSetFillStyle(xfi->display, xfi->gc, FillSolid); @@ -506,7 +506,7 @@ void xf_gdi_line_to(rdpContext* context, LINE_TO_ORDER* line_to) xfInfo* xfi = ((xfContext*) context)->xfi; xf_set_rop2(xfi, line_to->bRop2); - color = freerdp_color_convert_rgb(line_to->penColor, xfi->srcBpp, xfi->bpp, xfi->clrconv); + color = freerdp_color_convert_rgb(line_to->penColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); XSetFillStyle(xfi->display, xfi->gc, FillSolid); XSetForeground(xfi->display, xfi->gc, color); @@ -553,7 +553,7 @@ void xf_gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline) xfInfo* xfi = ((xfContext*) context)->xfi; xf_set_rop2(xfi, polyline->bRop2); - color = freerdp_color_convert_var(polyline->penColor, xfi->srcBpp, xfi->bpp, xfi->clrconv); + color = freerdp_color_convert_var(polyline->penColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); XSetFillStyle(xfi->display, xfi->gc, FillSolid); XSetForeground(xfi->display, xfi->gc, color); @@ -641,8 +641,8 @@ void xf_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt) brush = &mem3blt->brush; bitmap = (xfBitmap*) mem3blt->bitmap; xf_set_rop3(xfi, gdi_rop3_code(mem3blt->bRop)); - foreColor = freerdp_color_convert_rgb(mem3blt->foreColor, xfi->srcBpp, xfi->bpp, xfi->clrconv); - backColor = freerdp_color_convert_rgb(mem3blt->backColor, xfi->srcBpp, xfi->bpp, xfi->clrconv); + foreColor = freerdp_color_convert_rgb(mem3blt->foreColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); + backColor = freerdp_color_convert_rgb(mem3blt->backColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); if (brush->style == GDI_BS_PATTERN) { @@ -711,7 +711,7 @@ void xf_gdi_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc) xfInfo* xfi = ((xfContext*) context)->xfi; xf_set_rop2(xfi, polygon_sc->bRop2); - brush_color = freerdp_color_convert_var(polygon_sc->brushColor, xfi->srcBpp, xfi->bpp, xfi->clrconv); + brush_color = freerdp_color_convert_var(polygon_sc->brushColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); npoints = polygon_sc->numPoints + 1; points = xmalloc(sizeof(XPoint) * npoints); @@ -768,8 +768,8 @@ void xf_gdi_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb) brush = &(polygon_cb->brush); xf_set_rop2(xfi, polygon_cb->bRop2); - foreColor = freerdp_color_convert_rgb(polygon_cb->foreColor, xfi->srcBpp, xfi->bpp, xfi->clrconv); - backColor = freerdp_color_convert_rgb(polygon_cb->backColor, xfi->srcBpp, xfi->bpp, xfi->clrconv); + foreColor = freerdp_color_convert_rgb(polygon_cb->foreColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); + backColor = freerdp_color_convert_rgb(polygon_cb->backColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); npoints = polygon_cb->numPoints + 1; points = xmalloc(sizeof(XPoint) * npoints); diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c index b25dc99d1..7cb248773 100644 --- a/client/X11/xf_graphics.c +++ b/client/X11/xf_graphics.c @@ -43,7 +43,7 @@ void xf_Bitmap_New(rdpContext* context, rdpBitmap* bitmap) if (bitmap->data != NULL) { data = freerdp_image_convert(bitmap->data, NULL, - bitmap->width, bitmap->height, xfi->srcBpp, xfi->bpp, xfi->clrconv); + bitmap->width, bitmap->height, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); if (bitmap->ephemeral != true) { @@ -273,12 +273,12 @@ void xf_Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height xfInfo* xfi = ((xfContext*) context)->xfi; bgcolor = (xfi->clrconv->invert)? - freerdp_color_convert_var_bgr(bgcolor, xfi->srcBpp, xfi->bpp, xfi->clrconv): - freerdp_color_convert_var_rgb(bgcolor, xfi->srcBpp, xfi->bpp, xfi->clrconv); + freerdp_color_convert_var_bgr(bgcolor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv): + freerdp_color_convert_var_rgb(bgcolor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); fgcolor = (xfi->clrconv->invert)? - freerdp_color_convert_var_bgr(fgcolor, xfi->srcBpp, xfi->bpp, xfi->clrconv): - freerdp_color_convert_var_rgb(fgcolor, xfi->srcBpp, xfi->bpp, xfi->clrconv); + freerdp_color_convert_var_bgr(fgcolor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv): + freerdp_color_convert_var_rgb(fgcolor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); XSetFunction(xfi->display, xfi->gc, GXcopy); XSetFillStyle(xfi->display, xfi->gc, FillSolid);