From 92b74071d015759ac0da3ef17d82ae0594818128 Mon Sep 17 00:00:00 2001 From: emersion Date: Mon, 2 Apr 2018 19:56:41 -0400 Subject: xwayland: support multiple wayland → xwayland selection transfers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes drag'n'drop support for Chromium. --- include/xwayland/xwm.h | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/xwayland/xwm.h b/include/xwayland/xwm.h index 63ee5894..c83dd7c6 100644 --- a/include/xwayland/xwm.h +++ b/include/xwayland/xwm.h @@ -47,6 +47,7 @@ enum atom_name { INCR, TEXT, TIMESTAMP, + DELETE, NET_WM_WINDOW_TYPE_UTILITY, NET_WM_WINDOW_TYPE_TOOLTIP, NET_WM_WINDOW_TYPE_DND, @@ -80,22 +81,33 @@ enum net_wm_state_action { #define XDND_VERSION 5 +struct wlr_xwm_selection; + +struct wlr_xwm_selection_transfer { + struct wlr_xwm_selection *selection; + bool incr; + bool flush_property_on_delete; + bool property_set; + struct wl_array source_data; + int source_fd; + struct wl_event_source *source; + + // when sending to x11 + xcb_selection_request_event_t request; + + // when receiving from x11 + int property_start; + xcb_get_property_reply_t *property_reply; +}; + struct wlr_xwm_selection { struct wlr_xwm *xwm; xcb_atom_t atom; xcb_window_t window; - xcb_selection_request_event_t request; xcb_window_t owner; xcb_timestamp_t timestamp; - int incr; - int source_fd; - int property_start; - xcb_get_property_reply_t *property_reply; - struct wl_event_source *property_source; - int flush_property_on_delete; - struct wl_array source_data; - xcb_atom_t target; - bool property_set; + + struct wlr_xwm_selection_transfer incoming; }; struct wlr_xwm { -- cgit v1.2.3