Usually it's Airplane Commonality that wins over the engines.
However, in the one case which is so famous, the 777X, you have to take into account the enormous disappointment that some operators have had with their GE90 fleets - British Airways being the prime example. They have now switched to RR-powered 777s.
I don't think that an airline would switch from an all-Boeing fleet of RR-777s to the A340NG JUST to get the Trent, but in the case of airlines who already have any airbus in thier fleet - A320. A330 powered by either IAE or RR engines they would prefer to add the A340NG even if they have an existing 777 fleet.
For example, Emirates have the RR-777 but they decided to buy A340-500s becuase thier A330s and 777s are RR powered.