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.
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