Skip to content
  • Peter Hutterer's avatar
    test: fix an intermitted failing test · 164a6a81
    Peter Hutterer authored
    
    
    The touchpad_2fg_scroll_initially_diagonal test would semi-reliably fail under
    valgrind but succeed otherwise. Cause was that on some devices, the initial
    diagonal movement wasn't diagonal enough and closer to a horizontal movement.
    This was fine on normal runs, but under valgrind we'd hit the "active
    threshold" time limit and lock to horizontal scrolling, ditching the remaining
    events and failing the test.
    
    Fix this by calculating the scroll vector based on the device's width/height
    ratio and go "more diagonal" on the initial vector.
    
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    164a6a81