I've got a window that can be moved by clicking on the background (it's irregularly shape, so it doesn't have a title bar). In that window is a view which is basically circular (not opaque, only draws and responds to a circular area in the middle of the view). The problem is that this results in "dead spots" in the corners of that view where I'd expect to be able to drag the window (like I can everywhere else in the background).

The view returns NO for -isOpaque, and NO for -mouseDownCanMoveWindow (since it needs to be able to track and respond to clicks in the content). In order to handle the fact that the view is non-square, I've implemented -hitTest: to see if the mouse is in the circular "live" area, and return the view, and return nil for things outside that (which results in the super-views hitTest routine to return the superview).

I've even overridden the window's content view to determine that it's hitTest: properly returns the content view when the user clicks on the corner of the round view.

Nothing I've tried, however, allows the user to actually drag the window while clicking in the corners of the round view. It's almost as if the "can move window by background" logic goes by bounding boxes only and doesn't actually call hitTest to determine what is clicked on (to see whose -mouseDownCanMoveWindow it should pay attention to). Everywhere else in the window, dragging works exactly as expected (so the window's isMovableByWindowBackgound works correctly), but just not those four corners.

Short of having the window's content view return NO for its mouseDownCanMoveWindow and then add window moving to the mouseDown/ mouseDragged routines (which seems ugly at best), is there something I'm missing?


Glenn Andreas                      [EMAIL PROTECTED]
 <http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build, mutate, evolve, animate



_______________________________________________

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

This email sent to [EMAIL PROTECTED]

Reply via email to