Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
On the iMac, open the Security pref pane within the System Preferences application. Check the "Disable remote control infrared receiver" box. Your Apple TV should no longer interfere with your iMac.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.