aboutsummaryrefslogtreecommitdiff
path: root/include/xwayland
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-04-02 19:56:41 -0400
committeremersion <contact@emersion.fr>2018-04-02 19:56:41 -0400
commit92b74071d015759ac0da3ef17d82ae0594818128 (patch)
tree4622bed231adc65e51385e5de2bce38b963c86ec /include/xwayland
parent8836b4f024f957971cae28a0fdc567ff16c8fbc8 (diff)
xwayland: support multiple wayland → xwayland selection transfers
This fixes drag'n'drop support for Chromium.
Diffstat (limited to 'include/xwayland')
-rw-r--r--include/xwayland/xwm.h32
1 files changed, 22 insertions, 10 deletions
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 {