On 01/06/12 02:44, Christopher Howard wrote:
This is my first post to this list, so pardon any breach of protocol:
but I was rather curious about something and this seemed like the only
place where someone might actually know the answer. Why is it that in
Xlib.h, the x,y,width,height members are always declared as ints, but in
Xinerama.h (in XineramaScreenInfo, specifically) they ended up being
shorts? Naively, it would seem strange that Xinerama heads would be
restricted to a dimension that could be considerably smaller than that
allowed for the actual display.

All coordinates and screen/pixmap sizes in the actual protocol are 16-bit
numbers.   The Xlib mapping of those to C types is just generally a series
of mistakes baked into the API 25 years ago.   (Just wait until you find
the places you have to cast 32-bit numbers to "long" and back.)

We hope to have made fewer mistakes in the design and implementation of
the XCB API, but only time will tell.

--
        -Alan Coopersmith-        alan.coopersm...@oracle.com
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com

Reply via email to