xwayland: start drag on dnd selection notify

This commit is contained in:
emersion 2018-05-19 14:52:50 +01:00
parent 7d18812735
commit 0207105291
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
8 changed files with 170 additions and 83 deletions

View file

@ -1,6 +1,8 @@
#ifndef XWAYLAND_SELECTION_H
#define XWAYLAND_SELECTION_H
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_primary_selection.h>
#include <xcb/xfixes.h>
#define INCR_CHUNK_SIZE (64 * 1024)
@ -39,6 +41,18 @@ struct wlr_xwm_selection {
struct wl_list outgoing;
};
struct wlr_xwayland_data_source {
struct wlr_data_source base;
struct wlr_xwm_selection *selection;
struct wl_array mime_types_atoms;
};
struct wlr_xwayland_primary_selection_source {
struct wlr_primary_selection_source base;
struct wlr_xwm_selection *selection;
struct wl_array mime_types_atoms;
};
void xwm_selection_transfer_remove_source(
struct wlr_xwm_selection_transfer *transfer);
void xwm_selection_transfer_close_source_fd(
@ -63,6 +77,10 @@ int xwm_handle_xfixes_selection_notify(struct wlr_xwm *xwm,
bool data_source_is_xwayland(struct wlr_data_source *wlr_source);
bool primary_selection_source_is_xwayland(
struct wlr_primary_selection_source *wlr_source);
struct wlr_xwayland_data_source *xwayland_data_source_create(
struct wlr_xwm_selection *selection);
struct wlr_xwayland_data_source *xwayland_data_source_from_wlr_data_source(
struct wlr_data_source *wlr_source);
void xwm_seat_handle_start_drag(struct wlr_xwm *xwm, struct wlr_drag *drag);
int xwm_dnd_handle_xfixes_selection_notify(struct wlr_xwm *xwm,