[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1287.0. "Bigger Windows" by COMICS::CARLETON (Did he fall ... or was he pushed?) Wed Aug 16 1989 13:33

    Hi there,
    
    	I have a customer who wants to create a window bigger than
    32767x32767 and has found that he can't. Surely this should be possible
    as the parameter of size is an unsigned int.
    
    Excuse my ignorance if this is something trivial, but I am not
    conversant with the intrikcasies of X (having problems creating
    windows!).
    
    Cheers
    
    Les
    

T.RTitleUserPersonal
Name
DateLines
1287.1FLUME::dikeWed Aug 16 1989 13:584
The X protocol restricts window dimemsions to 16 bits.  Short of an extension,
there is nothing anyone can do about it.
				Jeff

1287.2COMICS::CARLETONDid he fall ... or was he pushed?Thu Aug 17 1989 06:008
    yes, but even if it is restricted to 16bits, when unsigned is used
    it should allow up to 65535x65535 surely?
    
    These bigger windows work on SUN running X server (rel. 2)
    
    Les
    

1287.3Different StrokesSDSVAX::SWEENEYHoney, I iconified the kidsThu Aug 17 1989 09:2711
    The protocol defines POINT as four bytes encoded as two 16 bit SIGNED
    integers.
    
    A line drawn from (-1,-1) to (1,1) should be a very short line in the
    upper left hand corner of the screen.
    
    If interpreted as (65535,65535) to (1,1), that is as a very long line
    from the upper left hand corner of the screen to the lower right hand
    corner of the screen. Then that appears to me to be a very serious error
    in interpreting the X Protocol.

1287.4Signed and unsignedCOMICS::CARLETONDid he fall ... or was he pushed?Thu Aug 17 1989 09:5210
    Re .-1
    
    Can you explain how this refers to the creation of windows and why
    width and height are defined as unsigned ints in the reference manual
    (refering to XCreateWindow) and thus <65535 should be acceptable?
    
    Les
    

1287.5dimension and location are differentLBDUCK::SCHOELLERWho&#039;s on first?Thu Aug 17 1989 12:304
Width and height are unsigned, x and y are signed.  That allows you to do things
like placing a window which is larger than its parent with the upper left area
clipped by the parent.  (ie: parent is 10x10  child is 20x20 at location -5-5)

1287.6Que?COMICS::CARLETONDid he fall ... or was he pushed?Thu Aug 17 1989 12:387
    Does this mean that if you position the window at -32767,-32767
    you can have a window sized at 65535x65535? and does this mean that
    it can't be moved?
    
    Les
    

1287.7more infoCOMICS::CARLETONDid he fall ... or was he pushed?Thu Aug 17 1989 13:059
    Another peice of info I just gleaned from him is that the Xserver
    throws an interger parameter out of range error when trying to create
    a window with a width or height bigger than 32767 no matter where
    the start position of the window is.
    
    Cheers
    Les
    

1287.8Still hopingCOMICS::CARLETONMore potential than a power line ...Wed Sep 06 1989 05:489
    Does anyone have any more information on .-1, .-2, the customer
    still wants to do this. Is this a QAR/SPR situation? or just the
    way of the world?
    
    Cheers for the help
    
    Les
    

1287.9Learn to live with itDECWIN::KLEINWed Sep 06 1989 11:587
It is the "way of the world".

You will not be able to create windows bigger than 32Kx32K using X windows.
The wire protocol reserves CARD16 for width and height.

-steve-

1287.10but it works on SUNCOMICS::CARLETONMore potential than a power line ...Wed Sep 06 1989 12:026
	If this is how it is, how come my customer can create bigger
    than 32Kx32K on X11R3 for SUN systems? Is it different or what?
    
    In hope ... Les
    

1287.11KONING::KONINGNI1D @FN42eqWed Sep 06 1989 14:515
    CARD16 should mean 0..65535, so it would be possible, if people want to
    do the work, to support up to 64kx64k without wire protocol change.
    
    	paul

1287.12Guess what I had for breakfastDECWIN::KLEINWed Sep 06 1989 16:136
RE: CARD16 is 65535, not 32K-1.

You are so right.  Egg on my face.

-steve-

1287.13limits?COMICS::CARLETONMore potential than a power line ...Thu Sep 07 1989 06:099
    Okay, 
    
    I think what you said is that this is *theoretically* possible,
    so why can't it be done? Is there a limit set somewhere in the kernel
    or in a similar parameter file somewhere that has to be changed
    to do this?
    
    Les

1287.14Explanation of coordinate problemsDECWIN::FISHERBurns Fisher 381-1466, ZKO3-4/W23Thu Sep 07 1989 14:3428
The problem is that coordinates are signed while widths and heights are
not.  That means that coordinates are in the range -32k to +32K while
widths and heights are in the range 0-64k.

Now this is all fine except that you frequently have to figure out all 4
corner coordinates.  If you calculate the right-most X coordinate by adding
the left-most coordinate and the width is greater 32K you overflow.  (You
can cons up other circumstances as well, where the width is < 32k).

The only solution to this is to convert all the internal arithmetic to 32bit.
This not only takes up memory, which heaven knows we use enough of already,
but also takes up developer time which could be spent on <choose your favorite
topic...say backing store>.  I'm not sure about the timings, but in could
conceivable make things slower too.  I don't remember.

Thus, the fix we came up with was to limit the width and height values
to 32k and return an error otherwise.

I would assume than any server which is running on a machine where "short"
is 16 bits, and which is based on the original MIT server would have the
same problem.  Sun, in the process of creating its merged X/NeWS product
totally rewrote the server.  If this is the version that your customer is
looking at, it may well be different.  It would not surprise me if Sun
decided to use all fixed or even floating point internally to accomodate
the PostScript-like NeWS model better.  This might make things slower.

Burns

1287.15Incompatable?COMICS::CARLETONMore potential than a power line ...Fri Sep 08 1989 06:3111
    Since the Xprotocol defines the width as unsigned int, would it
    not be sensible and in line with the protocol to implement it as
    such. ie to have the 64kx64k window size possible?
    
    Is this a bug? Is it worth SPRing? The cust is porting a very popular
    database product to ultrix/DECwindows and seems to object to the
    differences/incompatabilities between our version of X and SUNs.
    
    Les
    

1287.16Does this mean ...COMICS::CARLETONMore potential than a power line ...Fri Sep 08 1989 06:4611
    Mmmmm,
    
    Does this mean that if you create a window at say 32K-4 of width
    say 500 then you can't actually write to the 496 rightmost pixels
    of the window?
    
    Sounds screwy to me
    
    Les
    

1287.17DECWIN::FISHERBurns Fisher 381-1466, ZKO3-4/W23Fri Sep 08 1989 14:0524
re .-1:  Talking about the protocol, at least, no.  Once you have created
your window at that location, then you talk about things in relative coordinates
and you can talk about stuff in the right 496 bits.  In terms of the existing
servers, yes.  Things may well break somewhere along the line.

re .-2:
Feel free to qar it.  Also tell us how much performance for ordinary cases
and how many features you are willing to give up to have a very unusual case
fixed.

That last sentence was a bit too caustic.  Sorry.  This is the kind of
tradeoff we need to make, though.  When we put in the workaround in version
one (sending an error if we discovered a width coordinate that was greater
than 15 bits), we did so because there some bugs in a few applications and
in the toolkit which accidently specified such widths sometimes (it was
subtracting n from m and getting a negative number which was interpreted
as a large unsigned number).  We have since had very few (if any other)
complaints...since X does not have a display list, very few people have
cared about having windows larger than the screen.  If you have customers
who need it, do put in a QAR.


Burns

1287.18And on ... and on ...KERNEL::CARLETONLThe Urban Spaceman IIWed Oct 25 1989 11:2811
    
    A corollory (I think thats what I mean) to this. 
    
    This problem doesn't arrise in the RISC implementation of the X
    server (according to the developer). Isn't there supposed to be
    common source and if so, when is this common source going to be
    in the VAX server.
    
    Les