At 12:02 PM -0800 11/6/08, ic  wrote:
Date: Thu, 6 Nov 2008 14:20:08 -0500
From: Eric Gorr <[EMAIL PROTECTED]>
Subject: Re: A finished moving notification for a window?
To: Cocoa Dev <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes


On Nov 6, 2008, at 1:52 PM, Eric Gorr wrote:

It looks like the only way to get the behavior I want is to subclass NSWindow and override the mouse movement functions for the NSResponder.

Well, this just got a little more complicated.

The window does not mouseDown or mouseUp events if the user clicks in the title bar.

I found an old thread:

http://lists.apple.com/archives/cocoa-dev/2006/Oct/msg00141.html

related to this issue, but there was no solution posted to the mailing list.

i manage this with a subclass of nswindow as follows:
        register to receive the NSWindowWillMoveNotification notification
        upon receiving this notification, set an iVar windowIsMoving
        override send event as follows:

- (void) sendEvent: (NSEvent*) theEvent {
        [super sendEvent: theEvent];
        if ([self windowIsMoving])
                if ([theEvent type] == NSLeftMouseUp)
                        [self endMove];
        }

(don't forget to turn off windowIsMoving in endMove)

ken
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to