I would agree with Jason on βnormalβ cases. But I think that there are special situations when he can arrange such a thing. Apparently, Apple also thinks so; starting with 10.6 - all you have to do is call NSWindows'
- (void)setMovable:(BOOL)flag
or override
- (BOOL)isMovable;
in a subclass of NSWindow to change window mobility.
If this is not available, the Quartz Event Services API ( documentation ) provides ways to prevent window movement. One way would be to set the touch on an event and manipulate incoming events to only contain the initial mousedown location instead of the updated (real) location when the user starts dragging the window.
source share