I suspect compiz: you can use Alt+F2 then type in that will restart compiz, without affecting any other programs. If that works, we can then troubleshoot why you're facing the compiz problem in the first place.
Originally Posted by pjnsmb
If it doesn't try restarting the entire X server; a quick way is Ctrl+Alt+BkSpace but it will drop you back to the login screen. If that too doesn't work, try restarting the gdm as below; this will also drop you at the login screen, but at least you can avoid a restart cycle.
To restart GDM, switch to Ctrl+Alt+F1, login, give the command
, then when you get the [OK], switch back with Ctrl_Alt_F7.
sudo /etc/init.d/gdm restart
If any of these work, we can then attempt to see why the problem occurs in the first place.