I have found the cause of the problem. If the movable flag in NSWindow is set to NO, it will cause this feature to be unusable.
Topic:
UI Frameworks
SubTopic:
AppKit