I used to have the same problem. I managed to fix it after installing the NVIDIA alternate web drivers and enabling them.
After a reboot, everything turned to normal. I only had problems with the Apple icon turning glitchy when I opened XCode, but I've managed to fix that by disabling the...