• 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: Panther's NSScreen vs. screen resolution changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Panther's NSScreen vs. screen resolution changes


  • Subject: Re: Panther's NSScreen vs. screen resolution changes
  • From: Shaun Wexler <email@hidden>
  • Date: Tue, 8 Jun 2004 13:17:59 -0700

On Jun 8, 2004, at 6:01 AM, Peter Maurer wrote:

Hi group,

has anyone ever noticed that Panther's NSScreen class doesn't seem to perceive screen resolution changes while an application is running? I always have to restart my application to make [[[NSScreen screens] objectAtIndex: 0] frame] return the actual screen size after changing the screen resolution. I've never had this problem with Jaguar.

Could this be due to excessive caching, or is it just me?

You should listen for NSApplicationDidChangeScreenParametersNotification or NSWindowDidChangeScreensNotification (in your NSWindow delegate), and use either of those to refresh your list of NSScreen objects. They're both triggered by the same event. I think that this behavior is a big hairy bug, and that this notification (name?) is misleading, redundant, and it would be more useful if it actually did what it says: notified when a window frame has moved onto a different screen's frame. If that's the type of notification you need, you have to listen for NSWindowDidMoveNotification (which are coalesced, thankfully), and compare the current NSScreen to the cached previous screen for your window.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Panther's NSScreen vs. screen resolution changes
      • From: Peter Maurer <email@hidden>
References: 
 >Panther's NSScreen vs. screen resolution changes (From: Peter Maurer <email@hidden>)

  • Prev by Date: Re: Best Practice for implementing NSUndoManager?
  • Next by Date: How does Pixie get the mouse position?
  • Previous by thread: Panther's NSScreen vs. screen resolution changes
  • Next by thread: Re: Panther's NSScreen vs. screen resolution changes
  • Index(es):
    • Date
    • Thread