Skip to content
  • Jakub Janků's avatar
    x11: invalidate requests for targets on grab from client · 3aff7839
    Jakub Janků authored
    
    
    If XSetSelectionOwner() is invoked during the time
    we are waiting for the requested clipboard targets,
    the targets we eventually receive are no longer valid.
    
    To solve this, ignore the same count of target notifications
    as we expected at the time we received grab from the client.
    
    Otherwise we end up in a situation when vdagent holds
    the clipboard grab in the guest but cannot provide data to the
    apps that request it - this can be observed in the log:
    
        clipboard: received selection request event for target *, while not owning client clipboard
    
    Signed-off-by: default avatarJakub Janků <jjanku@redhat.com>
    Acked-by: default avatarVictor Toso <victortoso@redhat.com>
    3aff7839