I had this same problem. There's an option to have focus follow the mouse. Disable that, and you should be good. I think what happens is if you click on a window and move the mouse to another window, the first window doesn't recognize the 'mouse up' event, so it kinda throws it off.