samvermette/SVProgressHUD — pull request #137 by erydo (2013-02-06 05:32:02+00:00)
Title: Restore previous key window on dismissal.

This was a problem introduced (or, not solved completely) in commit d8983e8076.
The issue is described by issue #56.

The previous method would restore whichever window was the lowest (and not
necessarily that, as UIWindows.windows doesn't appear to be guaranteed to be
sorted by .windowLevel).

This was causing an issue in our application which has a UIWindow for
displaying animated backgrounds. That window has a windowLevel of *less* than
UIWindowLevelNormal, and the previous code was setting that one to the
keyWindow. This caused problems trying to get a keyboard to display from a
UIWebView.