iMac late 2009, Screen mess up - black windows
I would use following steps to address the problem.

I see that your background (desktop, the menu bar and the icons look fine) and it works fine in low resolution mode (system restore screen) lets do some testing:


Start in safe mode (hold Shift) to eliminate 3d party applications (and resolution settings).
Log in as different user to eliminate problems with your account.


If no problem, repair your user account using the cmd-r and password reset process (without resetting password, but repairing the ACL's)


Plug in External Monitor to eliminate build in monitor.
Reset PRAM Command (⌘)-Option-P-R
Run Apple Hardware Test (hold D) to check for hardware problems.
If AHT does not start it is probably on the CD that came with computer