[RFC] Convert FOR_ALL_WINDOWS to use a locally declared pointer

Opened the original file to understand whats was going on with the braceless blocks.