mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
basic touch dnd
This commit is contained in:
parent
94e7dc8a3e
commit
6a516f7c41
9 changed files with 210 additions and 78 deletions
|
|
@ -56,6 +56,9 @@ struct roots_cursor {
|
|||
struct wl_listener pointer_grab_begin;
|
||||
struct wl_listener pointer_grab_end;
|
||||
|
||||
struct wl_listener touch_grab_begin;
|
||||
struct wl_listener touch_grab_end;
|
||||
|
||||
struct wl_listener request_set_cursor;
|
||||
};
|
||||
|
||||
|
|
@ -99,4 +102,10 @@ void roots_cursor_handle_pointer_grab_begin(struct roots_cursor *cursor,
|
|||
void roots_cursor_handle_pointer_grab_end(struct roots_cursor *cursor,
|
||||
struct wlr_seat_pointer_grab *grab);
|
||||
|
||||
void roots_cursor_handle_touch_grab_begin(struct roots_cursor *cursor,
|
||||
struct wlr_seat_touch_grab *grab);
|
||||
|
||||
void roots_cursor_handle_touch_grab_end(struct roots_cursor *cursor,
|
||||
struct wlr_seat_touch_grab *grab);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ struct roots_drag_icon {
|
|||
struct wl_list link; // roots_seat::drag_icons
|
||||
bool mapped;
|
||||
|
||||
bool is_pointer;
|
||||
bool touch_id;
|
||||
|
||||
int32_t sx;
|
||||
int32_t sy;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ wlr_pointer_grab_interface wlr_data_device_pointer_drag_interface;
|
|||
extern const struct
|
||||
wlr_keyboard_grab_interface wlr_data_device_keyboard_drag_interface;
|
||||
|
||||
extern const struct
|
||||
wlr_touch_grab_interface wlr_data_device_touch_drag_interface;
|
||||
|
||||
struct wlr_data_device_manager {
|
||||
struct wl_global *global;
|
||||
};
|
||||
|
|
@ -55,14 +58,18 @@ struct wlr_drag {
|
|||
struct wlr_seat_keyboard_grab keyboard_grab;
|
||||
struct wlr_seat_touch_grab touch_grab;
|
||||
|
||||
struct wlr_seat *seat;
|
||||
struct wlr_seat_client *seat_client;
|
||||
struct wlr_seat_client *focus_client;
|
||||
|
||||
bool is_pointer_grab;
|
||||
|
||||
struct wlr_surface *icon;
|
||||
struct wlr_surface *focus;
|
||||
struct wlr_data_source *source;
|
||||
|
||||
bool cancelling;
|
||||
int32_t grab_touch_id;
|
||||
|
||||
struct wl_listener icon_destroy;
|
||||
struct wl_listener source_destroy;
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ struct wlr_seat_touch_state {
|
|||
struct wl_list touch_points; // wlr_touch_point::link
|
||||
|
||||
uint32_t grab_serial;
|
||||
uint32_t grab_id;
|
||||
|
||||
struct wlr_seat_touch_grab *grab;
|
||||
struct wlr_seat_touch_grab *default_grab;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue