Revert "small gui_getWindow fix."

This reverts commit 64198d3352b1177806bc15b1ae8cd443196e1e90.
Revert "Revert "small gui_getWindow fix.""

This reverts commit 6958d31cc28d0dde101814864cddb0df95781062.