This reverts commit e63a5d8529. window_handle is also used at many other places, so just move it here isn't allowed
e63a5d8529