Hi Mike,

I'm using an NSViewAnimation to fade the windows, which I suspect uses the alpha channel. A window close is nearly instantaneous, so I'm not worried about the tiny window between when I check to see if the window is exposed and when it closes.

Of course, because of the transparency of the covering windows, it is even more difficult to know whether the window is exposed or not. :-)

Jason

On Aug 15, 2008, at 6:07 PM, Michael Ash wrote:

On Fri, Aug 15, 2008 at 2:18 PM, Jason Bobier <[EMAIL PROTECTED]> wrote:
Hey folks,

I'd like to fade my window out if any portion of it is visible to the user, otherwise I simply want to close it for speed. Is there an easy way to
determine if some portion of the window is visible?

If you're fading out the window using setAlphaValue: then it's likely
the window server will realize when your window can't be seen anywhere
and will be smart enough not to redraw anything, saving you from
having to do any work. I don't know if any way to find out for
yourself, and indeed it's kind of tough because the user could easily
expose your window in between your check and the action you take based
on it.

Mike
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/jbobier%40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to