home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 22314 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.9 KB  |  48 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!enterpoop.mit.edu!usc!rpi!ghost.dsi.unimi.it!piovanel
  3. From: piovanel@ghost.dsi.unimi.it (marco piovanelli)
  4. Subject: Re: Saving window position
  5. References: <1993Jan25.140957.24643@ghost.dsi.unimi.it> <nerm-250193114535@17.202.128.133> <1993Jan26.060335.7349@hobbes.kzoo.edu>
  6. Organization: Computer Science Dep. - Milan University
  7. Date: Wed, 27 Jan 1993 12:05:20 GMT
  8. Message-ID: <1993Jan27.120520.18264@ghost.dsi.unimi.it>
  9. Lines: 37
  10.  
  11. k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
  12.  
  13. >nerm@apple.com (Dean Yu) writes:
  14. >>piovanel@ghost.dsi.unimi.it (marco piovanelli) wrote:
  15. >>> 
  16. >>>    The function returns TRUE if windowFrame is COMPLETELY ENCLOSED
  17. >>>    in the Gray Region.  But other applications (e.g. the Finder and
  18. >>>    StuffIt Lite) restore the window position even if the window frame
  19. >>>    is mostly offscreen.  What is the correct algorithm?
  20. >>
  21. >>  The currently favored method is if the user can still get to the title
  22. >>bar from where the window currently is, leave it alone.
  23.  
  24. >How about modifying that to:  can still _easily_see_ the title bar from
  25. >where the window currently is.  The title bar might only have one pixel
  26. >on the screen...
  27.  
  28. OK, but HOW easily?  What the Finder seems to do is:
  29.  
  30. 1. Calculate the title bar rect from the saved window position.
  31.  
  32. 2. Inset the rect a little (4 pixels, I think).
  33.  
  34. 3. Restore the saved position if this rect intersects the Gray Region.
  35.  
  36. But now suppose a user zooms a window to full screen on a 21" monitor,
  37. then reopens the document at home on his 9" classic monitor.  The above
  38. algorithm would choose to restore the saved window rect.  But the user
  39. would find it pretty difficult to reach the offscreen zoom box or grow box.
  40.  
  41. Maybe a better algorithm is to save the GDRect of the original screen
  42. and resize the window if that GDRect doesn't belong to one of the
  43. available devices.
  44.  
  45. Anyway, thanks for the suggestions.
  46.  
  47.                     -- marco
  48.