Can you tell us something about your Mac? Year, Model, and version of OS X you're running? It looks like a problem with graphics. The next time the green squares appear take a screen shot of your desktop. Observe the screen shot. If the green squares appear on the screen shot, it's a problem with your graphics chipset. Post back and let us know.
Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.