aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-01-04 06:15:17 -0500
committerGitHub <noreply@github.com>2018-01-04 06:15:17 -0500
commitce3a48c3169abf6c76a6aa4ce1ba0f81d0071bff (patch)
treeceed5ff582a9fd41fedba6076561748219590304 /xwayland
parent767df15b029c7cb2f840591f465b81dd34bcfd83 (diff)
parentc599d8024c5788aa4e15a026c46577723c8bb531 (diff)
Merge pull request #542 from emersion/abstract-data-source
Abstract data sources
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/selection.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/xwayland/selection.c b/xwayland/selection.c
index 65599145..060c0baf 100644
--- a/xwayland/selection.c
+++ b/xwayland/selection.c
@@ -153,7 +153,8 @@ error_out:
static void xwm_selection_source_send(struct wlr_xwm_selection *selection,
const char *mime_type, int32_t fd) {
if (selection == &selection->xwm->clipboard_selection) {
- struct wlr_data_source *source = selection->xwm->seat->selection_source;
+ struct wlr_data_source *source =
+ selection->xwm->seat->selection_data_source;
if (source != NULL) {
source->send(source, mime_type, fd);
return;
@@ -214,7 +215,8 @@ static void xwm_selection_send_timestamp(struct wlr_xwm_selection *selection) {
static struct wl_array *xwm_selection_source_get_mime_types(
struct wlr_xwm_selection *selection) {
if (selection == &selection->xwm->clipboard_selection) {
- struct wlr_data_source *source = selection->xwm->seat->selection_source;
+ struct wlr_data_source *source =
+ selection->xwm->seat->selection_data_source;
if (source != NULL) {
return &source->mime_types;
}
@@ -834,8 +836,8 @@ void xwm_selection_finish(struct wlr_xwm *xwm) {
xcb_destroy_window(xwm->xcb_conn, xwm->selection_window);
}
if (xwm->seat) {
- if (xwm->seat->selection_source &&
- xwm->seat->selection_source->cancel == data_source_cancel) {
+ if (xwm->seat->selection_data_source &&
+ xwm->seat->selection_data_source->cancel == data_source_cancel) {
wlr_seat_set_selection(xwm->seat, NULL,
wl_display_next_serial(xwm->xwayland->wl_display));
}
@@ -871,7 +873,7 @@ static void seat_handle_selection(struct wl_listener *listener,
struct wlr_seat *seat = data;
struct wlr_xwm *xwm =
wl_container_of(listener, xwm, seat_selection);
- struct wlr_data_source *source = seat->selection_source;
+ struct wlr_data_source *source = seat->selection_data_source;
if (source != NULL && source->send == data_source_send) {
return;