Auto-changing focus with dual monitors
Just make sure you remember to activate the text area you want to type in by clicking on it first, condition yourself to be aware of what is active.


Pay attention to which application is active

[insert image of Mac OS x application bar]
Pay attention to which window in an application is active, notice the differences in title bar color and transparency.

[insert image of window active differences in an os x app]
Pay attention to what and if any text input areas are selected and ready for text input.

[insert image of blinking input cursor -->| in text area ]
Be redundant and just click if you don't want to do the above observations. 


This seems to crop up since scrolling works with out having to click on the window / content, and I think this leads us into a confused state that we have activated the app / window by placing the cursor over it and scrolling. 

However that is not the case since scrolling a window by just mouse-ing over does not change which program was originally active. And to enter text or do other command actions that still requires that you tell Mac OS where your intending your input to go other wise it remembers the last active place selected.

And actually for other OS's this is a feature, called focus follow pointer or mouse but unfortunatly is not really implemented at a system wide level on OS X according to comments and feedback noted here Focus-follows-mouse (plus auto-raise) on Mac OS X. So it is not something you can easily enable in system preferences, and as far as I can tell no 3rd party App exist to add this functionality to OS X.

There are some defaults work arounds for certain apps to allow windows in those certain apps to be activated on mouse over, but unfortunately there does not seem to be a system wide option for OS X.