Howto create a window with ARGB32-visual?
Aaron Plattner
aplattner at nvidia.com
Fri Sep 24 05:56:43 PDT 2010
On Fri, Sep 24, 2010 at 05:25:05AM -0700, Clemens Eisserer wrote:
> Hi,
>
> I would like to create a Window with ARGB32-visual to reproduce a bug
> I experience
> with shaped ARGB32 windows when not using a composition manager,
> however I always get a BadMatch error.
>
> My attemp tried to find a 32-bit visual, and pass that to XCreateWindow:
>
> XVisualInfo info;
> int cnt;
> XVisualInfo *visInfos = XGetVisualInfo(display, 0, NULL, &cnt);
>
> while(cnt-- > 0) {
> if(visInfos[x].depth == 32) {
> info = visInfos[x];
> }
> }
>
> XCreateWindow(display, root, 0, 0, 200, 200, 0, 32, InputOutput,
> info.visual, 0, NULL);
>
> Any idea whats wrong here?
You need to create a colormap and I think also specify a border pixel value
and pass those in via the attribute structure parameter to XCreateWindow.
> Thank you in advance, Clemens
More information about the xorg
mailing list