Skip to content
  • Carlos Garnacho's avatar
    wayland: Refactor selection ownership · 9db511f6
    Carlos Garnacho authored
    Dissociate ownership from our maintenance of wl_data_source objects.
    The only place where ownership must be updated together is
    data_source.cancelled, for the other places GDK should take care of
    setting up the right ownership, even if at a different order than
    we'd expect here.
    
    This fixes GTK+ apps on wayland being locally confused about the
    current selection ownership. Because gtk_selection_add_targets()
    results in a wl_data_source being created, and ownership being
    updated right away, early callers of this will change the ownership
    even if the widget it's being called on didn't explicitly request
    the selection ownership yet.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758660
    9db511f6