[comp.windows.news] Possible bug in NeWS

putnam@thuban.steinmetz (putnam) (06/18/87)

The following NeWS code illustrates a possible bug in NeWS.  It seems that 
subcanvasses are restricted in where they can be moved relative to their 
parent.  A subcanvas can be moved arbitraritly far to the right or down, but
only to the edge of the parent left or up.  This can be seen in the top level
window manager where a window will stop moving when pushed against the left
(or top) border of the screen, but will continue to the right or bottom.

The following code also illustrates it:

cat >>canvas.test <<End_It_All
#!/usr/NeWS/bin/psh
dictbegin
  /w framebuffer /new DefaultWindow send def 
  /c null def
dictend begin 
  100 100 400 400 /reshape w send
  /map w send 
  w begin 
    ClientCanvas setcanvas 
    0 1 1000 { pop pause } for % give it time for initial display
    1 fillcanvas
    /c ClientCanvas newcanvas store 
    0 0 200 200 rectpath c reshapecanvas 
    c /Mapped true put
    c setcanvas 
    % 100 100 movecanvas
    % 1 fillcanvas
    c setcanvas -100 -100 movecanvas 
    0.2 fillcanvas 0 strokecanvas
    (one ) print ClientCanvas setcanvas c getcanvaslocation pstack clear
    c setcanvas -100 300 movecanvas 
    0.4 fillcanvas 0 strokecanvas
    (two ) print ClientCanvas setcanvas c getcanvaslocation pstack clear
    c setcanvas 300 300 movecanvas 
    0.6 fillcanvas 0 strokecanvas
    (three ) print ClientCanvas setcanvas c getcanvaslocation pstack clear 
    c setcanvas 300 -100 movecanvas 
    0.8 fillcanvas 0 strokecanvas
    (four ) print ClientCanvas setcanvas c getcanvaslocation pstack clear
end end
End_It_All
chmod +x canvas.test 
canvas.test

Well, shall we go?  -- jefu (jeff putnam)
Yes, lets go.       -- UUCP: steinmetz!putnam
(They do not move.) -- ARPA: putnam@ge-crd.com