Don't do the thing if the mouse isn't grabbed.

Signed-off-by: andrewphorn <andrewphorn@gmail.com>