Unable to create a redirected window with a rgba-colormap

Russell Shaw rjshaw at netspace.net.au
Sat Dec 8 05:31:49 PST 2007


Mirco Müller wrote:
> Am Samstag, den 08.12.2007, 07:59 +0100 schrieb Mirco Müller:
> 
>> 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
> 
> 	In the meantime I was able to fix this by the very "scientific"
> approach of trial-and-error. It turned out to be missing...
> 
>         windowAttribs.border_pixel = 0;
> 
> ... and...
> 
>         iWindowAttribsMask = CWBorderPixel | CWEventMask | CWColormap;
> 
> 	I really tried this by pure chance as there is nothing in the man-page
> of XCreateWindow() hinting someone towards this. This makes me wonder
> again how anybody can properly learn developing against X11.

You really need the "XLIB Programming Manual".

http://www.amazon.com/Programming-Manual-Definitive-Guides-Window/dp/1565920023/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1197120206&sr=8-1

also "XLIB Reference Manual R5":

http://www.amazon.com/Reference-Manual-Definitive-Guides-Window/dp/1565920066/ref=pd_sim_b_title_1

also useful, "OpenGL Programming for the X Window System":

http://www.amazon.com/OpenGL-Programming-X-Window-System/dp/0201483599/ref=sr_1_1?ie=UTF8&s=books&qid=1197120535&sr=1-1



More information about the xorg mailing list