Clean up mouse event masking.