I have exactly the same problem with Ubuntu 11.10 on a AMD Athlon PC with a GeForce 7300 graphic card, using Unity 2D. Initially I thought it was somehow related to the nvidia driver, but the posts in this thread show that it's not true. What happens is that randomly, the mouse stops interacting with the desktop and open application windows (no more clicking possible, no mouse-over effects), but the mouse cursor is moving correctly. The side-bar also keeps working correctly. The applications are not frozen, because they continue responding to keyboard input. It seems as if the desktop/application area suddenly simply stopped receiving mouse events.
In fact, this problem started to appear about a week ago on Ubuntu 10.04 with a gnome desktop, then I upgraded, but the problem remained.
The only solution when this problem happens is to kill the X-server and login again, which is quite annoying.
I would be grateful for any help! - Maybe somebody knows how to trace event propagation in the X-Server?
Edit: I tracked it down to some relationship with keyboard / mouse:
I exchanged the input devices with my other PC (running Ubuntu 10.10) and suddenly the same problem appeared on the other PC (mouse event propagation suddenly seems broken in some windows / on the desktop). I managed to get it back working by pressing randomly all mouse buttons (4 buttons and scroll wheel). My wireless mouse and keyboard are connected to the PC through one single USB stick.
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ MLK Trust Deskset 15176 id=10 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ MLK Trust Deskset 15176 id=9 [slave keyboard (3)]
When using xev, I see that no events outside the taskbar are shown (no event inside the xev window neither)
The funny thing is, that this keyboard/mouse worked for years. Maybe this issue appeared somewhere around kernel 2.6.35-31-generic and stayed on in later kernels.
Can anybody confirm this? Should I file a bug?