selection: implement copy *to* primary

This commit is contained in:
Daniel Eklöf 2019-07-11 17:34:52 +02:00
parent 703aeecb95
commit 66e067082b
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 91 additions and 8 deletions

View file

@ -369,7 +369,7 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
if (button == BTN_LEFT && term->selection.end.col == -1)
selection_cancel(term);
else
selection_finalize(term);
selection_finalize(term, serial);
term->mouse.button = 0; /* For motion events */
term_mouse_up(term, button, term->mouse.row, term->mouse.col,