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