Make sure "focus follows mouse" is unchecked.