Re: X coords are 16 bits!



I don't usually contribute, but...

This dates back to the very early days of X11 and even before.  In those
days (early to mid '80s), nobody could imagine a screen bigger than 32K.
Even if  such a thing  could be built,  it would be immense,  and nobody
would want to sit close enough to need 32K resolution.  And memory was
limited, so storing all coordinates in 32 bits would have been foolish
and wasteful.

What we all missed, of course, is the whole idea of virtual screens,
multiple monitors, and viewports.  So now a 100K screen is not only
conceivable, but sensible.  But the 16-bit assumption is hardwired in
all sorts of places.  It's not just the X servers, there are hundreds
(probably thousands) of applications that use 16-bit integers
internally.

Fortunately, the apps aren't as big a problem as they might be, since
they usually only care about window-relative coordinates.  So most won't
have to be changed.  But fixing this is going to be painful.

> What should I do? Ask directly at Xorg mailing list for the fix?

I think so.  But expect to get a lot of discussion (if not outright
flaming), and don't expect a quick resolution.  Even if people agree
with you, it's going to take a long time, maybe years, to find and fix
all the places where a 32-bit coordinate was stored into a short to save
a bit of space.

Yuck.
-- 
    Geoff Kuenning   geoff cs hmc edu   http://www.cs.hmc.edu/~geoff/

One could not be a successful scientist without realizing that, in contrast to
the popular conception supported by newspapers and mothers of scientists, a
goodly number of scientists are not only narrow-minded and dull, but also just
stupid. -- James Watson


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]