Improved the dragging of dialogs.