Better mouse drag handling

This prevents the changing of mouse cursor and/or selecting text while
using drag/grep to control x/y axis.