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

Maintaining NSCursor outside of app window


  • Subject: Maintaining NSCursor outside of app window
  • From: Markus Spoettl <email@hidden>
  • Date: Thu, 13 Jan 2011 19:11:39 -0500

Hello,

  I have a drag-n-drop UI where I use the [NSCursor disappearingItemCursor] to indicate that if you drop now, you're going to remove the item being dragged. I do this by setting the cursor when my dragging destination receives a -draggingExited: message (the dragging destination and source are the same, an NSView subclass).

It works well inside the application but when the cursor leaves the application window, things break down. When this happens the cursor is reset to the default arrow cursor. What's worse is that it doesn't return to -disappearingItemCursor when the cursor re-enters my window - not view - without releasing the mouse.

What I'd like to get to is a behavior like that of Finder. When you drag a "Places" item out of the source list Finder somehow manages to maintain the cursor, even if the app behind the cursor is something else.

My drag starts with a call to NSView's -dragImage:at:offset:event:pasteboard:source:slideBack:

I'd rather not implement the whole dragging UI (transparent foreground window occupying the entire screen, painting the drag image myself - at least I think that's how it could work) if I can avoid it because I fear there are countless little traps to hit on the way.

Is there a way not to get the cursor reset by AppKit behind my back?

Regards
Markus
--
__________________________________________
Markus Spoettl

_______________________________________________

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

  • Follow-Ups:
    • Re: Maintaining NSCursor outside of app window
      • From: Corbin Dunn <email@hidden>
  • Prev by Date: Re: sending a message from an initializer method
  • Next by Date: Re: sending a message from an initializer method
  • Previous by thread: Re: QuickLook returning small image
  • Next by thread: Re: Maintaining NSCursor outside of app window
  • Index(es):
    • Date
    • Thread