adds windowMoving handler