aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/selection/incoming.c6
-rw-r--r--xwayland/selection/selection.c25
2 files changed, 16 insertions, 15 deletions
diff --git a/xwayland/selection/incoming.c b/xwayland/selection/incoming.c
index 79197e60..e3f68ea7 100644
--- a/xwayland/selection/incoming.c
+++ b/xwayland/selection/incoming.c
@@ -350,7 +350,7 @@ 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_selection(xwm->seat, &source->base,
+ wlr_seat_request_set_selection(xwm->seat, &source->base,
wl_display_next_serial(xwm->xwayland->wl_display));
} else {
wlr_data_source_cancel(&source->base);
@@ -425,10 +425,10 @@ int xwm_handle_xfixes_selection_notify(struct wlr_xwm *xwm,
// A real X client selection went away, not our
// proxy selection
if (selection == &xwm->clipboard_selection) {
- wlr_seat_set_selection(xwm->seat, NULL,
+ wlr_seat_request_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_request_set_primary_selection(xwm->seat, NULL,
wl_display_next_serial(xwm->xwayland->wl_display));
} else if (selection == &xwm->dnd_selection) {
// TODO: DND
diff --git a/xwayland/selection/selection.c b/xwayland/selection/selection.c
index dee7f9c3..a8cb5df4 100644
--- a/xwayland/selection/selection.c
+++ b/xwayland/selection/selection.c
@@ -255,11 +255,11 @@ static void xwm_selection_set_owner(struct wlr_xwm_selection *selection,
}
}
-static void seat_handle_selection(struct wl_listener *listener,
+static void handle_seat_set_selection(struct wl_listener *listener,
void *data) {
struct wlr_seat *seat = data;
struct wlr_xwm *xwm =
- wl_container_of(listener, xwm, seat_selection);
+ wl_container_of(listener, xwm, seat_set_selection);
struct wlr_data_source *source = seat->selection_source;
if (source != NULL && data_source_is_xwayland(source)) {
@@ -269,11 +269,11 @@ static void seat_handle_selection(struct wl_listener *listener,
xwm_selection_set_owner(&xwm->clipboard_selection, source != NULL);
}
-static void seat_handle_primary_selection(struct wl_listener *listener,
+static void handle_seat_set_primary_selection(struct wl_listener *listener,
void *data) {
struct wlr_seat *seat = data;
struct wlr_xwm *xwm =
- wl_container_of(listener, xwm, seat_primary_selection);
+ wl_container_of(listener, xwm, seat_set_primary_selection);
struct wlr_primary_selection_source *source =
seat->primary_selection_source;
@@ -294,8 +294,8 @@ static void seat_handle_start_drag(struct wl_listener *listener, void *data) {
void xwm_set_seat(struct wlr_xwm *xwm, struct wlr_seat *seat) {
if (xwm->seat != NULL) {
- wl_list_remove(&xwm->seat_selection.link);
- wl_list_remove(&xwm->seat_primary_selection.link);
+ wl_list_remove(&xwm->seat_set_selection.link);
+ wl_list_remove(&xwm->seat_set_primary_selection.link);
wl_list_remove(&xwm->seat_start_drag.link);
xwm->seat = NULL;
}
@@ -306,13 +306,14 @@ void xwm_set_seat(struct wlr_xwm *xwm, struct wlr_seat *seat) {
xwm->seat = seat;
- wl_signal_add(&seat->events.selection, &xwm->seat_selection);
- xwm->seat_selection.notify = seat_handle_selection;
- wl_signal_add(&seat->events.primary_selection, &xwm->seat_primary_selection);
- xwm->seat_primary_selection.notify = seat_handle_primary_selection;
+ wl_signal_add(&seat->events.set_selection, &xwm->seat_set_selection);
+ xwm->seat_set_selection.notify = handle_seat_set_selection;
+ wl_signal_add(&seat->events.set_primary_selection,
+ &xwm->seat_set_primary_selection);
+ xwm->seat_set_primary_selection.notify = handle_seat_set_primary_selection;
wl_signal_add(&seat->events.start_drag, &xwm->seat_start_drag);
xwm->seat_start_drag.notify = seat_handle_start_drag;
- seat_handle_selection(&xwm->seat_selection, seat);
- seat_handle_primary_selection(&xwm->seat_primary_selection, seat);
+ handle_seat_set_selection(&xwm->seat_set_selection, seat);
+ handle_seat_set_primary_selection(&xwm->seat_set_primary_selection, seat);
}