diff --git a/libweston/input.c b/libweston/input.c index 25d3e75c5..bfd3763e5 100644 --- a/libweston/input.c +++ b/libweston/input.c @@ -51,6 +51,7 @@ #include "pointer-constraints-unstable-v1-server-protocol.h" #include "input-timestamps-unstable-v1-server-protocol.h" #include "tablet-unstable-v2-server-protocol.h" +#include "weston-trace.h" enum pointer_constraint_type { POINTER_CONSTRAINT_TYPE_LOCK, @@ -603,6 +604,10 @@ pointer_send_motion(struct weston_pointer *pointer, if (!pointer->focus_client) return; + WESTON_TRACE_ANNOTATE_PRINTF("pointer motion", "focus: %s, x: %.4f, y: %.4f", + pointer->focus->surface->label, + wl_fixed_to_double(sx), wl_fixed_to_double(sy)); + resource_list = &pointer->focus_client->pointer_resources; msecs = timespec_to_msec(time); wl_resource_for_each(resource, resource_list) { @@ -702,6 +707,9 @@ weston_pointer_send_button(struct weston_pointer *pointer, if (!weston_pointer_has_focus_resource(pointer)) return; + WESTON_TRACE_ANNOTATE_PRINTF("pointer button", "focus: %s, button: %.4d, state: %.4d", + pointer->focus->surface->label, button, state); + resource_list = &pointer->focus_client->pointer_resources; serial = wl_display_next_serial(display); msecs = timespec_to_msec(time); @@ -755,6 +763,11 @@ weston_pointer_send_axis(struct weston_pointer *pointer, if (!weston_pointer_has_focus_resource(pointer)) return; + WESTON_TRACE_ANNOTATE_PRINTF("pointer send axis", "focus: %s, axis: %d", + "has_discrete: %d, discrete: %d, value: %f", + pointer->focus->surface->label, event->axis, + event->has_discrete, event->discrete, event->value); + resource_list = &pointer->focus_client->pointer_resources; msecs = timespec_to_msec(time); wl_resource_for_each(resource, resource_list) { @@ -924,6 +937,10 @@ weston_touch_send_down(struct weston_touch *touch, const struct timespec *time, surf_pos = weston_coord_global_to_surface(touch->focus, pos); + WESTON_TRACE_ANNOTATE_PRINTF("touch send down", "focus: %s, id: %d " + "x: %.4f, y: %.4f", touch->focus->surface->label, + touch_id, surf_pos.c.x, surf_pos.c.y); + resource_list = &touch->focus_resource_list; serial = wl_display_next_serial(display); msecs = timespec_to_msec(time); @@ -970,6 +987,9 @@ weston_touch_send_up(struct weston_touch *touch, const struct timespec *time, if (!weston_touch_has_focus_resource(touch)) return; + WESTON_TRACE_ANNOTATE_PRINTF("touch send up", "focus: %s, id: %d", + touch->focus->surface->label, touch_id); + resource_list = &touch->focus_resource_list; serial = wl_display_next_serial(display); msecs = timespec_to_msec(time); @@ -1016,6 +1036,10 @@ weston_touch_send_motion(struct weston_touch *touch, surf_pos = weston_coord_global_to_surface(touch->focus, pos); + WESTON_TRACE_ANNOTATE_PRINTF("touch send motion", "focus: %s, id: %d, " + "x: %.4f, y: %.4f", touch->focus->surface->label, + touch_id, surf_pos.c.x, surf_pos.c.y); + resource_list = &touch->focus_resource_list; msecs = timespec_to_msec(time); wl_resource_for_each(resource, resource_list) { @@ -1118,6 +1142,10 @@ weston_keyboard_send_key(struct weston_keyboard *keyboard, if (!weston_keyboard_has_focus_resource(keyboard)) return; + WESTON_TRACE_ANNOTATE_PRINTF("keyboard event", "focus: %s, " + "code: %.4d, state: %.4d", + keyboard->focus->label, key, state); + resource_list = &keyboard->focus_resource_list; serial = wl_display_next_serial(display); msecs = timespec_to_msec(time);