Mouse event handling.