Skip to content
  • Sjoerd Simons's avatar
    device-manager-xi2: Fix core pointer retrieval race · 1be01985
    Sjoerd Simons authored and Emmanuele Bassi's avatar Emmanuele Bassi committed
    The core pointer concept doesn't really exist anymore in an XI2 world,
    so the clutter API is a bit of a mismatch with what X provides. Using
    XIGetClientPointer doesn't really help, as far as i can tell the
    semantics of XIGetClientPointer are essentially: Whatever the X server
    picked when it had to reply with device-dependant data to a query
    without a device specifier. Not very useful...
    
    To make matters worse, whether XIGetClientPointer returns a valid
    pointer depends on whether there has been a query that forced it to pick
    one in the first place, making the whole thing pretty non-deterministic.
    
    This patch changes things around such that instead of using
    XIGetClientPointer to determine the core pointer, we simply pick the
    first master pointer device. In practise this will essentially always
    be the X virtual core pointer.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729462
    1be01985