aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2019-01-22 20:13:01 +0100
committerGitHub <noreply@github.com>2019-01-22 20:13:01 +0100
commit365a75139c382b3627ee96eade827038b1a2bc1a (patch)
tree655ec06e18dd09a72322b5bb650230154e4708cf /xwayland
parent62658a318dedb3e0803092baa4685a80687249d0 (diff)
parent06467d2e1233d8c2830500ca399bcce8dd37a91b (diff)
Merge pull request #1485 from emersion/data-device-serial
primary-selection: add a serial argument
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/selection/incoming.c6
-rw-r--r--xwayland/selection/selection.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/xwayland/selection/incoming.c b/xwayland/selection/incoming.c
index 3e97ca04..79197e60 100644
--- a/xwayland/selection/incoming.c
+++ b/xwayland/selection/incoming.c
@@ -370,7 +370,8 @@ static void xwm_selection_get_targets(struct wlr_xwm_selection *selection) {
bool ok = source_get_targets(selection, &source->base.mime_types,
&source->mime_types_atoms);
if (ok) {
- wlr_seat_set_primary_selection(xwm->seat, &source->base);
+ wlr_seat_set_primary_selection(xwm->seat, &source->base,
+ wl_display_next_serial(xwm->xwayland->wl_display));
} else {
wlr_primary_selection_source_destroy(&source->base);
}
@@ -427,7 +428,8 @@ int xwm_handle_xfixes_selection_notify(struct wlr_xwm *xwm,
wlr_seat_set_selection(xwm->seat, NULL,
wl_display_next_serial(xwm->xwayland->wl_display));
} else if (selection == &xwm->primary_selection) {
- wlr_seat_set_primary_selection(xwm->seat, NULL);
+ wlr_seat_set_primary_selection(xwm->seat, NULL,
+ wl_display_next_serial(xwm->xwayland->wl_display));
} else if (selection == &xwm->dnd_selection) {
// TODO: DND
} else {
diff --git a/xwayland/selection/selection.c b/xwayland/selection/selection.c
index 4d7732cb..dee7f9c3 100644
--- a/xwayland/selection/selection.c
+++ b/xwayland/selection/selection.c
@@ -231,7 +231,8 @@ void xwm_selection_finish(struct wlr_xwm *xwm) {
if (xwm->seat->primary_selection_source &&
primary_selection_source_is_xwayland(
xwm->seat->primary_selection_source)) {
- wlr_seat_set_primary_selection(xwm->seat, NULL);
+ wlr_seat_set_primary_selection(xwm->seat, NULL,
+ wl_display_next_serial(xwm->xwayland->wl_display));
}
wlr_xwayland_set_seat(xwm->xwayland, NULL);
}