Merge pull request #336 from sunds/master

Inverted GDI when X server has BGR colormap
This commit is contained in:
Marc-André Moreau 2012-01-09 15:11:30 -08:00
commit 5165399b8c
2 changed files with 13 additions and 4 deletions

View File

@ -432,7 +432,9 @@ void xf_gdi_opaque_rect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect)
uint32 color; uint32 color;
xfInfo* xfi = ((xfContext*) context)->xfi; xfInfo* xfi = ((xfContext*) context)->xfi;
color = freerdp_color_convert_var_rgb(opaque_rect->color, xfi->srcBpp, 32, xfi->clrconv); color = (xfi->clrconv->invert)?
freerdp_color_convert_var_bgr(opaque_rect->color, xfi->srcBpp, 32, xfi->clrconv):
freerdp_color_convert_var_rgb(opaque_rect->color, xfi->srcBpp, 32, xfi->clrconv);
XSetFunction(xfi->display, xfi->gc, GXcopy); XSetFunction(xfi->display, xfi->gc, GXcopy);
XSetFillStyle(xfi->display, xfi->gc, FillSolid); XSetFillStyle(xfi->display, xfi->gc, FillSolid);
@ -461,7 +463,9 @@ void xf_gdi_multi_opaque_rect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* mult
DELTA_RECT* rectangle; DELTA_RECT* rectangle;
xfInfo* xfi = ((xfContext*) context)->xfi; xfInfo* xfi = ((xfContext*) context)->xfi;
color = freerdp_color_convert_var_rgb(multi_opaque_rect->color, xfi->srcBpp, 32, xfi->clrconv); color = (xfi->clrconv->invert)?
freerdp_color_convert_var_bgr(multi_opaque_rect->color, xfi->srcBpp, 32, xfi->clrconv):
freerdp_color_convert_var_rgb(multi_opaque_rect->color, xfi->srcBpp, 32, xfi->clrconv);
XSetFunction(xfi->display, xfi->gc, GXcopy); XSetFunction(xfi->display, xfi->gc, GXcopy);
XSetFillStyle(xfi->display, xfi->gc, FillSolid); XSetFillStyle(xfi->display, xfi->gc, FillSolid);

View File

@ -243,8 +243,13 @@ void xf_Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height
{ {
xfInfo* xfi = ((xfContext*) context)->xfi; xfInfo* xfi = ((xfContext*) context)->xfi;
bgcolor = freerdp_color_convert_var_rgb(bgcolor, xfi->srcBpp, 32, xfi->clrconv); bgcolor = (xfi->clrconv->invert)?
fgcolor = freerdp_color_convert_var_rgb(fgcolor, xfi->srcBpp, 32, xfi->clrconv); freerdp_color_convert_var_bgr(bgcolor, xfi->srcBpp, 32, xfi->clrconv):
freerdp_color_convert_var_rgb(bgcolor, xfi->srcBpp, 32, xfi->clrconv);
fgcolor = (xfi->clrconv->invert)?
freerdp_color_convert_var_bgr(fgcolor, xfi->srcBpp, 32, xfi->clrconv):
freerdp_color_convert_var_rgb(fgcolor, xfi->srcBpp, 32, xfi->clrconv);
XSetFunction(xfi->display, xfi->gc, GXcopy); XSetFunction(xfi->display, xfi->gc, GXcopy);
XSetFillStyle(xfi->display, xfi->gc, FillSolid); XSetFillStyle(xfi->display, xfi->gc, FillSolid);