Unable to create a redirected window with a rgba-colormap
Alan Coopersmith
alan.coopersmith at sun.com
Mon Dec 10 08:52:00 PST 2007
Russell Shaw wrote:
> 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
O'Reilly has made the Xlib Reference Manual, and several other books from
that series, available online for free - unfortunately, not yet the
Programming Manual. I've put links to them in the wiki at:
http://wiki.x.org/wiki/ProgrammingDocumentation
and
http://wiki.x.org/wiki/UserDocumentation
--
-Alan Coopersmith- alan.coopersmith at sun.com
Sun Microsystems, Inc. - X Window System Engineering
More information about the xorg
mailing list