Also, were your only changes this `if` block and the `_windowHasFocus` management stuff at the top?