Improved swipe/hover detection