Re: best way to determine if portion of window is visible?
Re: best way to determine if portion of window is visible?
- Subject: Re: best way to determine if portion of window is visible?
- From: "Michael Ash" <email@hidden>
- Date: Fri, 15 Aug 2008 18:07:10 -0400
On Fri, Aug 15, 2008 at 2:18 PM, Jason Bobier <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden