Skip to content
  • Peter Hutterer's avatar
    tools: fix grab argument passing for libinput debug-events · 68f124b9
    Peter Hutterer authored
    The &grab pointer we used to pass as userdata was the address of the function
    argument which goes out of scope at the end of the function. This works fine
    for devices immediately opened but when a device connects later, the address
    may have been re-used since and it's content is undefined. If not NULL, we
    end up grabbing the device.
    
    Instead pass the grab option in which is guaranteed to live until the end of
    main.
    
    #26
    
    
    
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 0a13223c)
    68f124b9