Fix problem with window's touch event