Fix mouse cursor drag with Java 8

We're basically copying the code from the case dragover to the case
dragend.