ui: Fix the check for the XInput opcode

When converting is_input_event to be the opposite, I forgot to make this
change.
ui: Bring back the is_input_event helper

This makes the logic clearer and easier to reason about.