Invert rectangle colors when X server uses inverted colors

This commit is contained in:
David Sundstrom 2012-01-09 15:39:19 -06:00
parent 20cacf5f29
commit dcdf1d7a5b

View File

@ -432,7 +432,9 @@ void xf_gdi_opaque_rect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect)
uint32 color;
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);
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;
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);
XSetFillStyle(xfi->display, xfi->gc, FillSolid);