KS (3_1_X) IOS window refactor KS changes for IOS7

Backport of PR #118