primary-selection: add a serial argument

The serial needs to be bumped when X11 clients set the selection, otherwise
some Wayland clients (e.g. GTK) will overwrite it when they gain focus.
This commit is contained in:
emersion 2019-01-21 19:23:40 +01:00
parent b619ab4d34
commit 06467d2e12
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
9 changed files with 32 additions and 19 deletions

View file

@ -163,7 +163,8 @@ void wlr_seat_destroy(struct wlr_seat *seat) {
seat->selection_source = NULL;
}
wlr_seat_set_primary_selection(seat, NULL);
wlr_seat_set_primary_selection(seat, NULL,
wl_display_next_serial(seat->display));
struct wlr_seat_client *client, *tmp;
wl_list_for_each_safe(client, tmp, &seat->clients, link) {