xfreerdp: apply X2GO patch

This commit is contained in:
Marc-André Moreau 2012-02-27 12:08:38 -05:00 committed by Anthony Tong
parent a46154e231
commit 999582ae76

View File

@ -353,6 +353,7 @@ boolean xf_get_pixmap_info(xfInfo* xfi)
XVisualInfo template;
XPixmapFormatValues* pf;
XPixmapFormatValues* pfs;
XWindowAttributes window_attributes;
pfs = XListPixmapFormats(xfi->display, &pf_count);
@ -379,6 +380,12 @@ boolean xf_get_pixmap_info(xfInfo* xfi)
template.class = TrueColor;
template.screen = xfi->screen_number;
if (XGetWindowAttributes(xfi->display, RootWindowOfScreen(xfi->screen), &window_attributes) == 0)
{
printf("xf_get_pixmap_info: XGetWindowAttributes failed\n");
return false;
}
vis = XGetVisualInfo(xfi->display, VisualClassMask | VisualScreenMask, &template, &vi_count);
if (vis == NULL)
@ -392,7 +399,7 @@ boolean xf_get_pixmap_info(xfInfo* xfi)
{
vi = vis + i;
if (vi->depth == xfi->depth)
if (vi->visual == window_attributes.visual)
{
xfi->visual = vi->visual;
break;