I've been running Ubuntu for years without problems, using mostly the same hardware for much of that time. But recently, I've begun having a strange problem, and I'm not sure where it might be coming from.
The mouse clicks stop registering in all the inactive windows.
I'm running Gnome classic/fallback, with Gnome panel and Cairo dock, and compiz.
Sometimes the problem happens after a day or two, sometimes immediately upon a reboot. If I'm using Firefox, it works fine, although I can no longer move or close the window with the mouse. New windows are simply dead. If it happens on boot, Cairo dock will work, but no windows. By work, I mean the mouse clicks; keyboard works normally.
I've tried resetting Compiz and gnome-panel, which don't help. What does work, and is the best workaround so far, is to bring up a virtual terminal, then switch back to the GUI using Alt + F7. Then everything works fine.
I've tried connecting a different mouse, to no avail (both USB, but I doubt that matters).
I've seem others that seem to have the same problem, back as far as 12.xx, but no answers. Seems like some have the problem with xfce, etc. One person seemed to fix it by updating his system, but I tried that and it didn't help.
I'm really not sure in what system this problem originates. The only clue I have that's new is the switching to VT and back. Whatever is run when switching back must reset the offending system.
I was able to determine that this problem is also exhibited when booting and logging in to the guest session, running Unity.
I don't know if I have any PS/2 mice hidden away somewhere, but I'll check. However, both the keyboard and mouse are plugged into the same USB port, and the keyboard works fine. Also, another USB mouse is plugged into a different USB port, and has the same problem. One mouse is Logitech, and one is IBM, and I've never had problems with either.
Today, the problem arose while using the system. I connected another mouse to a different port, which also didn't work. Then, I disconnected the first mouse and keyboard from the old USB-1 hub, which was connected via an old USB-1 cable, and connected it directly to a USB port on the front of the system. Problem went away.
So, I am now running without the extension cable, but with the hub, to see if the hub itself is OK. If the problem recurs, I may try it with a USB-2 hub, just to see if perhaps USB-1 might be a problem. But nothing has changed that recently except software, so maybe it's something in the kernel.
One other thing about the problem... There is usually one working window where the mouse works - usually firefox, but I use that a lot, so it's hard to tell for sure. When I open another window on top of this working window, and try to click or highlight something, the underlying window receives the mouse clicks, and its text will become highlighted just like the top window isn't there. But the top window does receive the keyboard events. So, it's puzzling to me how the hub would cause this, but I'm a mere mortal.