diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-11-14 08:51:37 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-11-15 08:34:48 -0500 |
commit | a337e9550587aea885779fe93340f1b90376682c (patch) | |
tree | 394c9b70fd98e7ffcd91dab459ab970eb0442d37 /include | |
parent | 4eab61f86f22f902a02f23f57cd318c2400d2729 (diff) |
wlr-touch: make dnd work
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_data_device.h | 1 | ||||
-rw-r--r-- | include/wlr/types/wlr_seat.h | 22 |
2 files changed, 22 insertions, 1 deletions
diff --git a/include/wlr/types/wlr_data_device.h b/include/wlr/types/wlr_data_device.h index b21e53bc..189ab59b 100644 --- a/include/wlr/types/wlr_data_device.h +++ b/include/wlr/types/wlr_data_device.h @@ -71,6 +71,7 @@ struct wlr_drag { bool cancelling; 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; diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h index e05bea47..ee13f99d 100644 --- a/include/wlr/types/wlr_seat.h +++ b/include/wlr/types/wlr_seat.h @@ -28,9 +28,13 @@ struct wlr_touch_point { int32_t touch_id; struct wlr_surface *surface; struct wlr_seat_client *client; + + struct wlr_surface *focus_surface; + struct wlr_seat_client *focus_client; double sx, sy; struct wl_listener surface_destroy; + struct wl_listener focus_surface_destroy; struct wl_listener resource_destroy; struct { @@ -74,6 +78,8 @@ struct wlr_touch_grab_interface { struct wlr_touch_point *point); void (*motion)(struct wlr_seat_touch_grab *grab, uint32_t time, struct wlr_touch_point *point); + void (*enter)(struct wlr_seat_touch_grab *grab, uint32_t time, + struct wlr_touch_point *point); // XXX this will conflict with the actual touch cancel which is different so // we need to rename this void (*cancel)(struct wlr_seat_touch_grab *grab); @@ -423,11 +429,25 @@ void wlr_seat_touch_notify_up(struct wlr_seat *seat, uint32_t time, * even if the surface is not the owner of the touch point for processing by * grabs. */ -void wlr_seat_touch_notify_motion(struct wlr_seat *seat, +void wlr_seat_touch_notify_motion(struct wlr_seat *seat, uint32_t time, + int32_t touch_id, double sx, double sy); + +/** + * Notify the seat that the touch point given by `touch_id` has entered a new + * surface. The surface is required. To clear focus, use + * `wlr_seat_touch_point_clear_focus()`. + */ +void wlr_seat_touch_point_focus(struct wlr_seat *seat, struct wlr_surface *surface, uint32_t time, int32_t touch_id, double sx, double sy); /** + * Clear the focused surface for the touch point given by `touch_id`. + */ +void wlr_seat_touch_point_clear_focus(struct wlr_seat *seat, uint32_t time, + int32_t touch_id); + +/** * Send a touch down event to the client of the given surface. All future touch * events for this point will go to this surface. If the touch down is valid, * this will add a new touch point with the given `touch_id`. The touch down may |