• 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: Maintaining NSCursor outside of app window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Maintaining NSCursor outside of app window


  • Subject: Re: Maintaining NSCursor outside of app window
  • From: Corbin Dunn <email@hidden>
  • Date: Fri, 14 Jan 2011 09:36:42 -0800

On Jan 14, 2011, at 1:00 AM, Uli Kusterer wrote:

> On 14.01.2011, at 01:37, Corbin Dunn wrote:
>> - (void)draggedImage:(NSImage *)draggedImage movedTo:(NSPoint)screenPoint
>>
>> Then do something like this (after converting the screen point to window coords):
>>
>>   NSPoint windowPoint = [[view window] mouseLocationOutsideOfEventStream];
>>   NSPoint localPoint = [view convertPoint:windowPoint fromView:nil];
>
> The OS will be very disappointed if it hands you a screenPoint and you just completely ignore it and use mouseLocationOutsideOfEventStream instead.

Sorry; I had contrived the example from some bits of code I had around. It is probably better to use the screenPoint passed to you. There was a reason mouseLocationOutsideOfEventStream is used in the above code...but I forget what it is.

But, FWIW, the OS won't be disappointed if you do this. It is perfectly acceptable. Try dragging an item out of Finder's sidebar on 10.6. If you think performance is unacceptable, then please log a bug:

http://bugreporter.apple.com

--corbin


> Due to lag, CPU load etc. It sounds like a better idea to use the parameter.



_______________________________________________

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: 
 >Maintaining NSCursor outside of app window (From: Markus Spoettl <email@hidden>)
 >Re: Maintaining NSCursor outside of app window (From: Corbin Dunn <email@hidden>)
 >Re: Maintaining NSCursor outside of app window (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: NSUndoManager retain/release of arguments - ad infinitum
  • Next by Date: Re: Determining whether a dictionary is mutable or not
  • Previous by thread: Re: Maintaining NSCursor outside of app window
  • Next by thread: Overriding target and action of backBarButtonItem
  • Index(es):
    • Date
    • Thread