mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-23 01:40:31 -05:00
xwayland: start drag on dnd selection notify
This commit is contained in:
parent
7d18812735
commit
0207105291
8 changed files with 170 additions and 83 deletions
|
|
@ -221,4 +221,8 @@ void wlr_data_source_dnd_finish(struct wlr_data_source *source);
|
|||
void wlr_data_source_dnd_action(struct wlr_data_source *source,
|
||||
enum wl_data_device_manager_dnd_action action);
|
||||
|
||||
struct wlr_drag *wlr_seat_client_start_grab(struct wlr_seat_client *client,
|
||||
struct wlr_data_source *source, struct wlr_surface *icon_surface,
|
||||
struct wlr_touch_point *point);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -188,7 +188,6 @@ struct wlr_seat {
|
|||
// `drag` goes away before `drag_source`, when the implicit grab ends
|
||||
struct wlr_drag *drag;
|
||||
struct wlr_data_source *drag_source;
|
||||
uint32_t drag_serial;
|
||||
|
||||
struct wlr_seat_pointer_state pointer_state;
|
||||
struct wlr_seat_keyboard_state keyboard_state;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ struct wlr_xwm {
|
|||
struct wl_list surfaces; // wlr_xwayland_surface::link
|
||||
struct wl_list unpaired_surfaces; // wlr_xwayland_surface::unpaired_link
|
||||
|
||||
struct wlr_drag *incoming_drag;
|
||||
struct wlr_drag *drag;
|
||||
struct wlr_xwayland_surface *drag_focus;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue