windows: Prevent possible errors on touch devices