• 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: mouseDown/Up on window's titlebar?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mouseDown/Up on window's titlebar?


  • Subject: Re: mouseDown/Up on window's titlebar?
  • From: m <email@hidden>
  • Date: Mon, 31 Jan 2005 13:02:09 -0600

On Jan 31, 2005, at 12:03 PM, Ken Tabb wrote:

I need to detect mouseDown / mouseUp / mouseDragged events on a window's titlebar - I'm implementing sticky windows (snappable palettes). These events are sent correctly when the mouse is in the content view, but not in the window's titlebar... mouseDragged is sent but not mouseDown / mouseUp.

I could set my window subclass as it's own delegate so that it receives the -windowWillMove and -windowDidMove notifications, which roughly speaking mimic mouseDown / mouseUp in terms of indicating the mouse state, however there are some circumstances when they don't work reliably enough for my needs.

Why is it not adequate to simply know when the window moved? Why do you need to know when the mouse is pressed and released?


If you just need to know whether the mouse is up or down when you recieve your windowDidMove notification, you can use NSApplication's currentEvent method to grab the event being processed and check the events modifier flags for mouse state.

_murat

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >mouseDown/Up on window's titlebar? (From: Ken Tabb <email@hidden>)

  • Prev by Date: Re: Question on a good database...
  • Next by Date: Re: NSImage thread safety
  • Previous by thread: Re: mouseDown/Up on window's titlebar?
  • Next by thread: NSImage thread safety
  • Index(es):
    • Date
    • Thread