timob-14751: Fix window opening states.
Merge pull request #4535 from hieupham007/timob-14751-3_1_X

timob-14751: Fix window opening states.