Re: Snapping windows while moving

2013-03-23 Thread Steve Mills
On Mar 23, 2013, at 02:41:21, Ken Thomases wrote: > Meaning you've overridden -isMovable? Or did you call -setMovable: with NO? > I think you have to do the latter because that configures the Window Server's > metadata about the window. It might also configure the theme frame views > (the

Re: Snapping windows while moving

2013-03-23 Thread Ken Thomases
On Mar 23, 2013, at 12:18 AM, Steve Mills wrote: > On Mar 13, 2013, at 10:34:35, Ken Thomases wrote: > >> The Window Server moves most windows entirely without involving the app >> (until the move is completed). If you want to change how windows get moved, >> I think you have to take over the

Re: Snapping windows while moving

2013-03-22 Thread Steve Mills
On Mar 13, 2013, at 10:34:35, Ken Thomases wrote: > The Window Server moves most windows entirely without involving the app > (until the move is completed). If you want to change how windows get moved, > I think you have to take over the whole process. You do [window > setMovable:NO] to make

Re: Snapping windows while moving

2013-03-14 Thread Steve Mills
On Mar 13, 2013, at 18:26:01, Seth Willits wrote: > On Mar 13, 2013, at 8:34 AM, Ken Thomases wrote: > >> The Window Server moves most windows entirely without involving the app >> (until the move is completed). > > Minor detail… while the window is being moved the app has no idea it's > hap

Re: Snapping windows while moving

2013-03-13 Thread Seth Willits
On Mar 12, 2013, at 1:54 PM, Steve Mills wrote: >> Pretty sure you want to subclass and override constrainFrameRect:toScreen: >> but I can't recall off the top of my head whether this is called live for >> every movement. I believe it is. > > Nope. It only seems to be called when the window is

Re: Snapping windows while moving

2013-03-13 Thread Ken Thomases
On Mar 12, 2013, at 3:11 PM, Steve Mills wrote: > What's the best way to go about snapping windows to screens and other windows > while dragging the window? I've tried catching it in windowDidMove (only when > the mouse is down), but that isn't called for every single movement of the > mouse. I

Re: Snapping windows while moving

2013-03-13 Thread Tamas Nagy
Exactly. On Mar 13, 2013, at 1:56 PM, Steve Mills wrote: > And you're seeing that getting called for every single movement of the mouse? > > -- > Steve Mills > office: 952-818-3871 > home: 952-401-6255 > cell: 612-803-6157 > > On Mar 13, 2013, at 00:11:50, Tamas Nagy wrote: > >> - (void)wind

Re: Snapping windows while moving

2013-03-13 Thread Steve Mills
And you're seeing that getting called for every single movement of the mouse? -- Steve Mills office: 952-818-3871 home: 952-401-6255 cell: 612-803-6157 On Mar 13, 2013, at 00:11:50, Tamas Nagy wrote: > - (void)windowDidMove:(NSNotification *)notification __

Re: Snapping windows while moving

2013-03-13 Thread Tamas Nagy
I'm using this: //http://www.cocoadev.com/index.pl?MagneticWindows - (void)windowDidMove:(NSNotification *)notification { NSEnumerator *e; NSWindow *theWindow; id edgeObject; NSArray *frames = NSApp windows] copy] autorelease] arrayByAddingObjectsFromArray:[N

Re: Snapping windows while moving

2013-03-12 Thread Steve Mills
On Mar 12, 2013, at 15:29:53, Seth Willits wrote: > Pretty sure you want to subclass and override constrainFrameRect:toScreen: > but I can't recall off the top of my head whether this is called live for > every movement. I believe it is. Nope. It only seems to be called when the window is bei

Re: Snapping windows while moving

2013-03-12 Thread Seth Willits
On Mar 12, 2013, at 1:11 PM, Steve Mills wrote: > What's the best way to go about snapping windows to screens and other windows > while dragging the window? I've tried catching it in windowDidMove (only when > the mouse is down), but that isn't called for every single movement of the > mouse. I