mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-23 06:59:44 -05:00
data-device: wlr-drag-icon
This commit is contained in:
parent
fa36ac90f7
commit
3b74db467b
8 changed files with 107 additions and 112 deletions
|
|
@ -4,27 +4,11 @@
|
|||
#include "rootston/input.h"
|
||||
#include "rootston/keyboard.h"
|
||||
|
||||
struct roots_drag_icon {
|
||||
struct wlr_surface *surface;
|
||||
struct wl_list link; // roots_seat::drag_icons
|
||||
bool mapped;
|
||||
|
||||
bool is_pointer;
|
||||
int32_t touch_id;
|
||||
|
||||
int32_t sx;
|
||||
int32_t sy;
|
||||
|
||||
struct wl_listener surface_destroy;
|
||||
struct wl_listener surface_commit;
|
||||
};
|
||||
|
||||
struct roots_seat {
|
||||
struct roots_input *input;
|
||||
struct wlr_seat *seat;
|
||||
struct roots_cursor *cursor;
|
||||
struct wl_list link;
|
||||
struct wl_list drag_icons;
|
||||
|
||||
// coordinates of the first touch point if it exists
|
||||
int32_t touch_id;
|
||||
|
|
|
|||
|
|
@ -53,6 +53,27 @@ struct wlr_data_source {
|
|||
} events;
|
||||
};
|
||||
|
||||
struct wlr_drag_icon {
|
||||
struct wlr_surface *surface;
|
||||
struct wlr_seat_client *client;
|
||||
struct wl_list link; // wlr_seat::drag_icons
|
||||
bool mapped;
|
||||
|
||||
bool is_pointer;
|
||||
int32_t touch_id;
|
||||
|
||||
int32_t sx;
|
||||
int32_t sy;
|
||||
|
||||
struct {
|
||||
struct wl_signal destroy;
|
||||
} events;
|
||||
|
||||
struct wl_listener surface_destroy;
|
||||
struct wl_listener surface_commit;
|
||||
struct wl_listener seat_client_unbound;
|
||||
};
|
||||
|
||||
struct wlr_drag {
|
||||
struct wlr_seat_pointer_grab pointer_grab;
|
||||
struct wlr_seat_keyboard_grab keyboard_grab;
|
||||
|
|
@ -64,7 +85,7 @@ struct wlr_drag {
|
|||
|
||||
bool is_pointer_grab;
|
||||
|
||||
struct wlr_surface *icon;
|
||||
struct wlr_drag_icon *icon;
|
||||
struct wlr_surface *focus;
|
||||
struct wlr_data_source *source;
|
||||
|
||||
|
|
@ -72,9 +93,9 @@ struct wlr_drag {
|
|||
int32_t grab_touch_id;
|
||||
|
||||
struct wl_listener point_destroy;
|
||||
struct wl_listener icon_destroy;
|
||||
struct wl_listener source_destroy;
|
||||
struct wl_listener seat_client_unbound;
|
||||
struct wl_listener icon_destroy;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -165,6 +165,8 @@ struct wlr_seat {
|
|||
struct wl_global *wl_global;
|
||||
struct wl_display *display;
|
||||
struct wl_list clients;
|
||||
struct wl_list drag_icons; // wlr_drag_icon::link
|
||||
|
||||
char *name;
|
||||
uint32_t capabilities;
|
||||
struct timespec last_event;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue