Is there a defined xpixmap width limit?

Marty Jack martyj19 at comcast.net
Fri Apr 22 09:39:12 PDT 2011



On 04/22/2011 11:44 AM, Emmanuel Thomas-Maurin wrote:
> On 04/22/2011 04:48 PM, Michael Stapelberg wrote:
>> Hi Emmanuel,
>>
>> Excerpts from Emmanuel Thomas-Maurin's message of 2011-04-22 14:31:04 +0200:
>>> I've been searching for this for a while: Is there a width and height
>>> limit for xpixmaps? I'm using GTK and I know GDK pixmaps and windows
>>> can't be wider than 65535. And I suspect for X, it's 32767.
>> As the width/height fields in the CreatePixmap request are CARD16s, the highest
>> value is (2^16)-1 = 65535. This is documented in the X protocol, see
>> http://www.x.org/releases/X11R7.6/doc/xproto/x11protocol.pdf (page 56 in the
>> pdf).
>>
>> Best regards,
>> Michael
> 
> Thanks Michael, that's what I was looking for. Maybe the results I got
> from the test come from some specific implementation that's not 100 %
> fully compliant with the protocol but that's really not that important
> anyways.
> 
> Best regards,
> Manu
> 

Despite the fact that CARD16 is unsigned, in practice widths and heights are limited to the signed range, up to 32767.

Here is an old paper by some of the original implementors that discusses the problems with mixing signed and unsigned in the protocol.

www.std.org/~msm/common/WhyX.pdf



More information about the xorg mailing list