Re: NS <-> CG Rect Conversion and screen coordinates

2009-04-01 Thread Jesper Storm Bache
Good (otherwise I would have had to change a few things on my side). The term "main" is very confusing and I did log the following radar a while back. 6392495 Confusing documentation for NSScreen It looks like it has been fixed (and is ready to be included in a future documentation

Re: NS <-> CG Rect Conversion and screen coordinates

2009-04-01 Thread Peter Ammon
My mistake, I saw mainScreenRect and assumed it was the frame of what Cocoa calls the main screen. -Peter On Apr 1, 2009, at 2:52 PM, Jesper Storm Bache wrote: Forgive me for being dense. Where is the subtle bug? The code is using CGMainDisplayID (not [NSScreen mainScreen] which would be t

Re: NS <-> CG Rect Conversion and screen coordinates

2009-04-01 Thread Jesper Storm Bache
Forgive me for being dense. Where is the subtle bug? The code is using CGMainDisplayID (not [NSScreen mainScreen] which would be the display with the key window) CGMainDisplayID is documented as: === The main display is the display with its screen location at (0,0) in global coordinates.

Re: NS <-> CG Rect Conversion and screen coordinates

2009-04-01 Thread Peter Ammon
On Mar 31, 2009, at 9:34 PM, Trygve Inda wrote: Using these two calls: NSRect nsRect = [screen frame]; CGRect cgRect = CGDisplayBounds (displayID); I get for my two screens: NSx=0y=0 w=2560h=1600 // screen A CGx=0y=0 w=2560h=1600 NSx=-1920y

Re: NS <-> CG Rect Conversion and screen coordinates

2009-03-31 Thread Chris Suter
Hi Trygve, 2009/4/1 Trygve Inda : > Using these two calls: > > NSRect nsRect = [screen frame]; > CGRect cgRect = CGDisplayBounds (displayID); > > I get for my two screens: > > NS    x=0        y=0      w=2560    h=1600  // screen A > CG    x=0        y=0      w=2560    h=1600 > > NS    x=-1920    

NS <-> CG Rect Conversion and screen coordinates

2009-03-31 Thread Trygve Inda
Using these two calls: NSRect nsRect = [screen frame]; CGRect cgRect = CGDisplayBounds (displayID); I get for my two screens: NSx=0y=0 w=2560h=1600 // screen A CGx=0y=0 w=2560h=1600 NSx=-1920y=184w=1920h=1200 // screen B CGx=-1920