It started happening after I used TAR to backup and restore my Linux system to a new partition. Whenever I build and run anything, my screen gets messed up and I have to relogin.
It looks worse on the actual screen. (I can't read the white console)
I tried reinstalling Code::Blocks, but I couldn't uninstall completely. All my settings were still the same after I reinstalled it. I also reinstalled g++ and my graphic driver, but it didn't solve anything. Does anyone have any idea what might be causing this?