XLib Help : RGBA Visual and Window Creation

Alan Coopersmith alan.coopersmith at oracle.com
Sun Apr 22 11:19:37 PDT 2012


On 04/22/12 08:01 AM, Lee Fallat wrote:
>    XVisualInfo *vlist = XGetVisualInfo(dpy, VisualDepthMask, &template, &nvi);
>  
>    for(int x = 0; x < nvi; x++)
>    {
>      if(vlist[x].depth == 32)
>        dc.vinfo = &vlist[x];
>    }

You don't seem to be handling the case where XGetVisualInfo doesn't return any
visuals of the depth you're requesting.

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc



More information about the xorg mailing list