@ -40,8 +40,8 @@ static void default_touch_cancel(struct wlr_seat_touch_grab *grab) {
}
}
static void default_touch_wl_cancel ( struct wlr_seat_touch_grab * grab ,
static void default_touch_wl_cancel ( struct wlr_seat_touch_grab * grab ,
struct wlr_s urface * surface ) {
struct wlr_s eat_client * seat_client ) {
wlr_seat_touch_send_cancel ( grab - > seat , s urface ) ;
wlr_seat_touch_send_cancel ( grab - > seat , s eat_client ) ;
}
}
const struct wlr_touch_grab_interface default_touch_grab_impl = {
const struct wlr_touch_grab_interface default_touch_grab_impl = {
@ -242,17 +242,12 @@ void wlr_seat_touch_notify_frame(struct wlr_seat *seat) {
}
}
void wlr_seat_touch_notify_cancel ( struct wlr_seat * seat ,
void wlr_seat_touch_notify_cancel ( struct wlr_seat * seat ,
struct wlr_s urface * surface ) {
struct wlr_s eat_client * seat_client ) {
struct wlr_seat_touch_grab * grab = seat - > touch_state . grab ;
struct wlr_seat_touch_grab * grab = seat - > touch_state . grab ;
if ( grab - > interface - > wl_cancel ) {
if ( grab - > interface - > wl_cancel ) {
grab - > interface - > wl_cancel ( grab , s urface ) ;
grab - > interface - > wl_cancel ( grab , s eat_client ) ;
}
}
struct wl_client * client = wl_resource_get_client ( surface - > resource ) ;
struct wlr_seat_client * seat_client = wlr_seat_client_for_wl_client ( seat , client ) ;
if ( seat_client = = NULL ) {
return ;
}
struct wlr_touch_point * point , * tmp ;
struct wlr_touch_point * point , * tmp ;
wl_list_for_each_safe ( point , tmp , & seat - > touch_state . touch_points , link ) {
wl_list_for_each_safe ( point , tmp , & seat - > touch_state . touch_points , link ) {
if ( point - > client = = seat_client ) {
if ( point - > client = = seat_client ) {
@ -399,13 +394,8 @@ void wlr_seat_touch_send_frame(struct wlr_seat *seat) {
}
}
}
}
void wlr_seat_touch_send_cancel ( struct wlr_seat * seat , struct wlr_surface * surface ) {
void wlr_seat_touch_send_cancel ( struct wlr_seat * seat ,
struct wl_client * client = wl_resource_get_client ( surface - > resource ) ;
struct wlr_seat_client * seat_client ) {
struct wlr_seat_client * seat_client = wlr_seat_client_for_wl_client ( seat , client ) ;
if ( seat_client = = NULL ) {
return ;
}
struct wl_resource * resource ;
struct wl_resource * resource ;
wl_resource_for_each ( resource , & seat_client - > touches ) {
wl_resource_for_each ( resource , & seat_client - > touches ) {
if ( seat_client_from_touch_resource ( resource ) = = NULL ) {
if ( seat_client_from_touch_resource ( resource ) = = NULL ) {