Howto create a window with ARGB32-visual?

Clemens Eisserer linuxhippy at gmail.com
Fri Sep 24 05:25:05 PDT 2010


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?

Thank you in advance, Clemens



More information about the xorg mailing list