Convert FOR_ALL_WINDOWS to use a locally declared pointer

Cleaned up the indentation here a bit.