• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: best way to determine if portion of window is visible?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: best way to determine if portion of window is visible?


  • Subject: Re: best way to determine if portion of window is visible?
  • From: Jason Bobier <email@hidden>
  • Date: Tue, 19 Aug 2008 12:22:07 -0400

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@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

_______________________________________________

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


References: 
 >best way to determine if portion of window is visible? (From: Jason Bobier <email@hidden>)
 >Re: best way to determine if portion of window is visible? (From: "Michael Ash" <email@hidden>)

  • Prev by Date: Re: best way to determine if portion of window is visible?
  • Next by Date: Re: Shared NSTextView
  • Previous by thread: Re: best way to determine if portion of window is visible?
  • Next by thread: RE: best way to determine if portion of window is visible?
  • Index(es):
    • Date
    • Thread