The minimize icon is gray It happens sometimes that the yellow circle in the top left of the windows, for minimizing, becomes gray for some windows. In particular it is gray for Finder, Safari, Calendar, iTerm2, Xchat Azure, Chrome, VirtualBox, and is still yellow for other windows, for example Mail, KeePassX, NoteBook, FreeMind, DjView, Lyx.

Obviously, when it is gray it is disabled.
The situation comes back to normal apparently without any reason.

The OS is Mountain Lion 10.8.5, and this is a screenshot
Well now I have to take a stab at this with the information and comments you have provided. I am going to guess that the OS is damaged, probably the WindowServer is screwed up (http://www.macinside.info/process.php?name=WindowServer).

This can be resolved with a reinstall of the OS. You should have any data loss but of course make sure you have an active backup of all files just to be on the safe side.

To test though you could turn off the OS function of restoring previous sessions and then restart the computer holding down the shift key. With the shift key held until you see the spinning gear. This starts your system in Safe mode where only Apple daemons are allowed to run. WindowServer is a part of the OS and if it is indeed damaged then the issue will appear (after some time maybe) in a Safe OS.