Skip to content
  • Peter Hutterer's avatar
    evdev: filter unreliable tablet mode switch events · 4cf4aba3
    Peter Hutterer authored
    If we know that the tablet mode switch is bogus anyway, filter the event and
    don't pass it to the caller. They won't know whether it's bogus so the only
    result we get here is buggy behaviour.
    
    This is the simplest solution here, it filters the mode switch at the lowest
    level and thus the caller won't know that the tablet even has a mode switch at
    all. Where the device doesn't have any other switches it'll also lose the
    switch capability.
    
    This may cause issues in some niche cases where the event node only has
    that one bit and we now disabled it leaving us with a zero-event bit device.
    Shouldn't matter to callers, but let's see.
    
    Fixes #491
    
    
    
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    4cf4aba3