Simplify condition check for mouse action/move.