Closing should occur in ProcessEvents.
Register mouse drag as well as move.