Hello everyone.

I am having a weird problem with the mouse device.
For some reason, new windows, and sometimes the desktop's frame (I don't know the official term) does not respond to mouse clicks or scroll. After a while, I don't know why, it seems like the mouse registered to the window and window responds to mouse clicks.

This is a repeatable behavior. Whenever I start a new GUI application. And it occurs in both Gnome and KDE.
I tried to uninstall both, and kdm gdm and reinstall. The problem wasn't solved.

I am using Ubuntu 12.04 and all new software from the repository.
I couldn't find anything suspicious in X logs, but I don't know what to look for exactly.

How can I solve this problem? What other information should I look for?
I did try to find other threads discussing the issue, but couldn't find. I guess it's mostly because I don't know how to the define the problem exactly.

Please Help thanks