Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improper Sheet Hiding Behavior



Thanks Eric. You are right. It was a bug in Tiger that is now only half fixed in Leopard. I fixed it in my app by doing two things. First I position the window just under the menu bar by setting the top coordinate to GetMBarHeight's return value. Then I also set the parent opacity to 0.0. This way my appearance shouldn't change unless sheet appearance changes in the future.

Thanks again for checking into it. Do you need me to file a bug with the actual problem in it? If so I'll do it.

Regards,
David Alger

********************
Ron Paul for President 2008

RESTORE THE REPUBLIC & RETAIN YOUR RIGHTS


On Nov 1, 2007, at 1:59 PM, Eric Schlegel wrote:


On Oct 30, 2007, at 9:27 AM, David Alger wrote:

The problem is that when this sheet is dismissed and pulled back up, the entire window group slides up ~20 or so pixels as well. This happens every time the sheet is hid & build up so that after time the main window group has slid all the way up the screen. This worked fine on Tiger, Panther, and Jaguar. It only behaves like this on Leopard.

I think what's happening here is that you position the sheet parent (the toolbar-class window) initially underneath the menubar, which means that when the sheet is displayed, the sheet parent is moved downwards below the menubar so that the sheet won't be obscured by the menubar. When the sheet closes, the Window Manager moves the sheet parent back to its original position. However, because the sheet parent window is in a window group with the MoveTogether attribute that also contains your backdrop window, the backdrop window moves too, along with the sheet parent.

I think this is actually correct behavior, and that the behavior in earlier systems was wrong. Consider this case: you have a document window with an open drawer. The document window is partially offscreen. You open a sheet on the document window. The document and the drawer should both move onscreen to allow the sheet to be fully visible, and then when the sheet closes, both the document and the drawer should move back to their original position. The document is like your parent window, and the drawer is like your backdrop. Both should move together.

I do think there's a bug here, but the bug is that the backdrop window should be moving down when the sheet is originally opened, along with the sheet parent window. If that happened, then the backdrop window would move back to its original position when the sheet closed, and wouldn't eventually move off the top of the screen. You might not want the backdrop window to move at all, but at least the behavior would be consistent.

I think the best way for you to fix this would be to temporarily remove the MoveTogether attribute from your window group when calling ShowSheetWindow and HideSheetWindow. Since you don't ever want the backdrop window to move together with the sheet parent window, this gives the Window Manager the right info about what behavior you desire.

-eric



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Improper Sheet Hiding Behavior (From: Eric Schlegel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.