Refactor how drag and drop is bound to the window frame