From 5ecbd23c1d44119cb32b345782d50c9664853109 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Thu, 15 Oct 2020 15:11:52 +0200 Subject: [PATCH] wlr_surface: fix argument order consistency This swaps the argument order of wlr_surface_accepts_touch() and wlr_surface_accepts_tablet_v2(), putting the wlr_surface argument first as should be the case for functions namespaced with wlr_surface_*. --- include/wlr/types/wlr_seat.h | 2 +- include/wlr/types/wlr_tablet_v2.h | 4 ++-- types/seat/wlr_seat_touch.c | 2 +- types/tablet_v2/wlr_tablet_v2_pad.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h index 06d8224e..24ed5c92 100644 --- a/include/wlr/types/wlr_seat.h +++ b/include/wlr/types/wlr_seat.h @@ -748,6 +748,6 @@ struct wlr_seat_client *wlr_seat_client_from_pointer_resource( /** * Check whether a surface has bound to touch events. */ -bool wlr_surface_accepts_touch(struct wlr_seat *wlr_seat, struct wlr_surface *surface); +bool wlr_surface_accepts_touch(struct wlr_surface *surface, struct wlr_seat *wlr_seat); #endif diff --git a/include/wlr/types/wlr_tablet_v2.h b/include/wlr/types/wlr_tablet_v2.h index 6da893b9..57e067d7 100644 --- a/include/wlr/types/wlr_tablet_v2.h +++ b/include/wlr/types/wlr_tablet_v2.h @@ -327,6 +327,6 @@ struct wlr_tablet_pad_v2_grab_interface { void wlr_tablet_v2_end_grab(struct wlr_tablet_v2_tablet_pad *pad); void wlr_tablet_v2_start_grab(struct wlr_tablet_v2_tablet_pad *pad, struct wlr_tablet_pad_v2_grab *grab); -bool wlr_surface_accepts_tablet_v2(struct wlr_tablet_v2_tablet *tablet, - struct wlr_surface *surface); +bool wlr_surface_accepts_tablet_v2(struct wlr_surface *surface, + struct wlr_tablet_v2_tablet *tablet); #endif /* WLR_TYPES_WLR_TABLET_V2_H */ diff --git a/types/seat/wlr_seat_touch.c b/types/seat/wlr_seat_touch.c index 09f33d66..3927bd23 100644 --- a/types/seat/wlr_seat_touch.c +++ b/types/seat/wlr_seat_touch.c @@ -476,7 +476,7 @@ bool wlr_seat_validate_touch_grab_serial(struct wlr_seat *seat, return false; } -bool wlr_surface_accepts_touch(struct wlr_seat *wlr_seat, struct wlr_surface *surface) { +bool wlr_surface_accepts_touch(struct wlr_surface *surface, struct wlr_seat *wlr_seat) { struct wl_client *client = wl_resource_get_client(surface->resource); struct wlr_seat_client *seat_client = wlr_seat_client_for_wl_client(wlr_seat, client); if (!seat_client) { diff --git a/types/tablet_v2/wlr_tablet_v2_pad.c b/types/tablet_v2/wlr_tablet_v2_pad.c index ab7c3fc4..052a017d 100644 --- a/types/tablet_v2/wlr_tablet_v2_pad.c +++ b/types/tablet_v2/wlr_tablet_v2_pad.c @@ -560,8 +560,8 @@ uint32_t wlr_send_tablet_v2_tablet_pad_mode(struct wlr_tablet_v2_tablet_pad *pad return serial; } -bool wlr_surface_accepts_tablet_v2(struct wlr_tablet_v2_tablet *tablet, - struct wlr_surface *surface) { +bool wlr_surface_accepts_tablet_v2(struct wlr_surface *surface, + struct wlr_tablet_v2_tablet *tablet) { struct wl_client *client = wl_resource_get_client(surface->resource); if (tablet->current_client &&