Merge "Use Event::isTouchEvent() to prevent a bad cast" into klp-dev