Occasionally, during intensive CPU load, I experience "lock" of window focus. I can't switch the active window using the mouse. If I do it by keyboard, new window shows up but focus stays in the old window. Also I can't use any window controls (in any window) or click on the panel.
I have experienced this in KDE 4.3.0 (and 4.2.4) and thought it was problem with kwin, but recently saw this on fluxbox, so I think it's xorg related issue.
I'm using xorg-1.6.3 with nvidia-drivers-173.14.20 and kernel 2.6.31-rc7. But I've also seen this happening with older releases.
Unfortunately I don't know how to accurately reproduce this bug. Usually this happens when I'm running emerge in console window in background while surfing the web with Opera 10. And when I Alt-tab to see progress or click on a link, I get this "focus stuck" problem.
The only thing you can do is to nice your CPU-hogging apps. Xorg doesn't have guards against such rogue processes.
Sorry, nothing we can do, it's in Xorg's code design.