Unable to create a redirected window with a rgba-colormap

Mirco Müller macslow at bangang.de
Fri Dec 7 22:59:05 PST 2007


Greetings xorg-crowd!

	Once more I'm suffering form the lack of tutorials, up-to-date
documentation on Composite, Render and general X11-development. I
desperately turn to this list asking for help to achieve the presumably
simple task of creating a redirected top-level X11-window with a
rgba-colormap (or visual).

Please have a look at the attached program below.

When calling XCreateWindow() like...

        window = XCreateWindow (pDisplay,
        			RootWindow (pDisplay,
        				    pVisInfo[i].screen),
        			50,
        			50,
        			300,
        			300,
        			0,
        			pVisInfo[i].depth,
        			InputOutput,
        			pVisInfo[i].visual,
        			iWindowAttribsMask,
        			&windowAttribs);

I get a...

        X Error of failed request:  BadMatch (invalid parameter attributes)
          Major opcode of failed request:  1 (X_CreateWindow)
          Serial number of failed request:  13
          Current serial number in output stream:  16

	When I do use CopyFromParent for the arguments depth and visual in
XCreateWindow() the program runs fine. What's the reason for this? How
can I make sure it works without using CopyFromParent? I assume to query
the list of VisualInfos in a correct way... but then I don't live and
breath X11 enough to be really certain.

	I also get the same BadMatch-error when I try to pass a dedicated
colormap (which is hopefully a rgba-colormap) to XCreateWindow(). How is
one supposed to create a window with a rgba-colormap?

	My motivation for going through all this is to understand - on the long
run - the needed nuts and bolts for making non-top-level windows being
redirected and hopefully stuffed in a GL-texture via
GLX_EXT_texture_from_pixmap. 

Humble thanks in advance to anybody helping me out with this!

Best regards...

Mirco "MacSlow" Müller
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x11-offscreen-redirection.c
Type: text/x-csrc
Size: 11567 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20071208/53a82bc0/attachment.c>


More information about the xorg mailing list