Re: knowing if a titlebar click is actually a resize click
Re: knowing if a titlebar click is actually a resize click
- Subject: Re: knowing if a titlebar click is actually a resize click
- From: Ken Thomases <email@hidden>
- Date: Wed, 12 Jun 2013 20:35:40 -0500
On Jun 12, 2013, at 4:48 PM, Steve Mills wrote:
> On Jun 12, 2013, at 16:21:06, Ken Thomases <email@hidden>
> wrote:
>
>> Does NSWindowWillStartLiveResizeNotification (or -[NSWindowDelegate windowWillStartLiveResize:]) happen in time for you to cancel your drag stuff?
>
> Nope. The default sendEvent appears to stay in the mouseDown event handler (NSTitledFrame mouseDown) until the mouse has moved 3 or 4 pixels, then it fires off the NSWindowWillStartLiveResizeNotification.
I'm not sure I understand. It's running an internal event loop? If that's the case, then you definitely get the NSWindowWillStartLiveResizeNotification before seeing an NSLeftMouseDragged. So, while you would have had to set up for your window moving during the NSLeftMouseDown, you can undo your internal state changes upon seeing the NSWindowWillStartLiveResizeNotification and then subsequently ignore any NSLeftMouseDragged events you see.
Actually, if you call super before handling mouse events as potential window dragging, then you should know if an NSLeftMouseDragged is a potential drag based on whether or not NSWindowWillStartLiveResizeNotification was posted during the call to super.
Or am I misunderstanding?
Regards,
Ken
_______________________________________________
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