Attempt to be smarter about focus gain/loss.