aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--types/seat/wlr_seat_pointer.c6
-rw-r--r--types/seat/wlr_seat_touch.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/types/seat/wlr_seat_pointer.c b/types/seat/wlr_seat_pointer.c
index e65ad7c2..e1182fd2 100644
--- a/types/seat/wlr_seat_pointer.c
+++ b/types/seat/wlr_seat_pointer.c
@@ -412,10 +412,16 @@ bool wlr_seat_validate_pointer_grab_serial(struct wlr_seat *seat,
struct wlr_surface *origin, uint32_t serial) {
if (seat->pointer_state.button_count != 1 ||
seat->pointer_state.grab_serial != serial) {
+ wlr_log(WLR_DEBUG, "Pointer grab serial validation failed: "
+ "button_count=%"PRIu32" grab_serial=%"PRIu32" (got %"PRIu32")",
+ seat->pointer_state.button_count,
+ seat->pointer_state.grab_serial, serial);
return false;
}
if (origin != NULL && seat->pointer_state.focused_surface != origin) {
+ wlr_log(WLR_DEBUG, "Pointer grab serial validation failed: "
+ "invalid origin surface");
return false;
}
diff --git a/types/seat/wlr_seat_touch.c b/types/seat/wlr_seat_touch.c
index 486fa55d..75b304a5 100644
--- a/types/seat/wlr_seat_touch.c
+++ b/types/seat/wlr_seat_touch.c
@@ -365,6 +365,10 @@ bool wlr_seat_validate_touch_grab_serial(struct wlr_seat *seat,
struct wlr_touch_point **point_ptr) {
if (wlr_seat_touch_num_points(seat) != 1 ||
seat->touch_state.grab_serial != serial) {
+ wlr_log(WLR_DEBUG, "Touch grab serial validation failed: "
+ "num_points=%d grab_serial=%"PRIu32" (got %"PRIu32")",
+ wlr_seat_touch_num_points(seat),
+ seat->touch_state.grab_serial, serial);
return false;
}
@@ -378,5 +382,7 @@ bool wlr_seat_validate_touch_grab_serial(struct wlr_seat *seat,
}
}
+ wlr_log(WLR_DEBUG, "Touch grab serial validation failed: "
+ "invalid origin surface");
return false;
}