Added patch to avoid duplicate mouse-events.