diff options
Diffstat (limited to 'include/xwayland')
-rw-r--r-- | include/xwayland/selection.h | 18 | ||||
-rw-r--r-- | include/xwayland/xwm.h | 2 |
2 files changed, 14 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); diff --git a/include/xwayland/xwm.h b/include/xwayland/xwm.h index 27b79b30..f467e107 100644 --- a/include/xwayland/xwm.h +++ b/include/xwayland/xwm.h @@ -103,6 +103,8 @@ struct wlr_xwm { xcb_render_pictformat_t render_format_id; xcb_cursor_t cursor; + // FIXME: need one per selection to simultaneously request both mimetypes, + // I think. xcb_window_t selection_window; struct wlr_xwm_selection clipboard_selection; struct wlr_xwm_selection primary_selection; |