I don't think you'll have much luck with trying to make it snap during a move, 
but you can detect the new position with windowDidMove: and fix it up there. 
You can't just watch setFrame or anything like that, because it's possible for 
the NSWindow's idea of its position to get out of sync with the WindowServer 
during moves. (rdar://15336036)

Why do you want to change the position? It's not something Mac windows normally 
do so users will be confused, and you've also got OSX itself with its own ideas 
of where windows should go, especially when it adds something like Mavericks' 
non-primary menubars and retrofits the new behavior in surprising ways. But 
depending on what your goals are, we might know better ways to achieve them.

----- Original Message -----
From: "Cosmin Apreutesei" <cosmin.apreute...@gmail.com>
To: "Lee Ann Rucker" <lruc...@vmware.com>
Cc: "Uli Kusterer" <witness.of.teacht...@gmx.net>, "Cocoa Cocoa-Dev" 
<Cocoa-dev@lists.apple.com>
Sent: Sunday, June 15, 2014 1:54:08 PM
Subject: Re: title bar hit test?

> I have edge snapping too. Try:
>
> windowWillResize:toSize:
> Return Value
> A custom size to which the specified window will be resized.
>
> It's called before every size change, including during live resizing.

Thanks, that's good for resizing. There's still a problem with the moving
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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

This email sent to arch...@mail-archive.com

Reply via email to