aboutsummaryrefslogtreecommitdiff
path: root/include/xwayland/selection.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/xwayland/selection.h')
-rw-r--r--include/xwayland/selection.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/include/xwayland/selection.h b/include/xwayland/selection.h
index 1d8d3ec4..07659cfd 100644
--- a/include/xwayland/selection.h
+++ b/include/xwayland/selection.h
@@ -20,37 +20,43 @@ struct wlr_xwm_selection_transfer {
struct wl_array source_data;
int wl_client_fd;
struct wl_event_source *event_source;
+ struct wl_list link;
// when sending to x11
xcb_selection_request_event_t request;
- struct wl_list outgoing_link;
// when receiving from x11
int property_start;
xcb_get_property_reply_t *property_reply;
+ xcb_window_t incoming_window;
};
struct wlr_xwm_selection {
struct wlr_xwm *xwm;
+
xcb_atom_t atom;
xcb_window_t window;
xcb_window_t owner;
xcb_timestamp_t timestamp;
- struct wlr_xwm_selection_transfer incoming;
+ struct wl_list incoming;
struct wl_list outgoing;
};
+struct wlr_xwm_selection_transfer *
+xwm_selection_find_incoming_transfer_by_window(
+ struct wlr_xwm_selection *selection, xcb_window_t window);
+
void xwm_selection_transfer_remove_event_source(
struct wlr_xwm_selection_transfer *transfer);
void xwm_selection_transfer_close_wl_client_fd(
struct wlr_xwm_selection_transfer *transfer);
void xwm_selection_transfer_destroy_property_reply(
struct wlr_xwm_selection_transfer *transfer);
-void xwm_selection_transfer_init(struct wlr_xwm_selection_transfer *transfer);
-void xwm_selection_transfer_finish(struct wlr_xwm_selection_transfer *transfer);
-bool xwm_selection_transfer_get_selection_property(
- struct wlr_xwm_selection_transfer *transfer, bool delete);
+void xwm_selection_transfer_init(struct wlr_xwm_selection_transfer *transfer,
+ struct wlr_xwm_selection *selection);
+void xwm_selection_transfer_destroy(
+ struct wlr_xwm_selection_transfer *transfer);
void xwm_selection_transfer_destroy_outgoing(
struct wlr_xwm_selection_transfer *transfer);