struct normalized_coords accel, unaccel;
struct device_float_coords raw;
- if (!(device->seat_caps & EVDEV_DEVICE_POINTER))
+ TRACE_BEGIN(fallback_flush_relative_motion);
+
+ if (!(device->seat_caps & EVDEV_DEVICE_POINTER)) {
+ TRACE_END();
return;
+ }
fallback_rotate_relative(dispatch, device);
dispatch->rel.y = 0;
/* Use unaccelerated deltas for pointing stick scroll */
- if (post_trackpoint_scroll(device, unaccel, time))
+ if (post_trackpoint_scroll(device, unaccel, time)) {
+ TRACE_END();
return;
+ }
if (device->pointer.filter) {
/* Apply pointer acceleration. */
accel = unaccel;
}
- if (normalized_is_zero(accel) && normalized_is_zero(unaccel))
+ if (normalized_is_zero(accel) && normalized_is_zero(unaccel)) {
+ TRACE_END();
return;
+ }
pointer_notify_motion(base, time, &accel, &raw);
+ TRACE_END();
}
static void
{
enum key_type type;
+ TRACE_BEGIN(fallbak_process_key);
+
/* ignore kernel key repeat */
- if (e->value == 2)
+ if (e->value == 2) {
+ TRACE_END();
return;
+ }
if (e->code == BTN_TOUCH) {
if (!device->is_mt)
device,
time,
e->value);
+ TRACE_END();
return;
}
case KEY_TYPE_KEY:
case KEY_TYPE_BUTTON:
if ((e->value && hw_is_key_down(dispatch, e->code)) ||
- (e->value == 0 && !hw_is_key_down(dispatch, e->code)))
+ (e->value == 0 && !hw_is_key_down(dispatch, e->code))) {
+ TRACE_END();
return;
+ }
dispatch->pending_event |= EVDEV_KEY;
break;
case KEY_TYPE_BUTTON:
break;
}
+ TRACE_END();
}
static void
struct evdev_device *device,
struct input_event *e, uint64_t time)
{
- if (fallback_reject_relative(device, e, time))
+ TRACE_BEGIN(fallback_process_relative);
+
+ if (fallback_reject_relative(device, e, time)) {
+ TRACE_END();
return;
+ }
switch (e->code) {
case REL_X:
dispatch->pending_event |= EVDEV_WHEEL;
break;
}
+ TRACE_END();
}
static inline void
struct input_event *e,
uint64_t time)
{
+ TRACE_BEGIN(fallback_process_absolute);
if (device->is_mt) {
fallback_process_touch(dispatch, device, e, time);
} else {
fallback_process_absolute_motion(dispatch, device, e);
}
+ TRACE_END();
}
static inline bool
{
struct libinput_event_device_notify *added_device_event;
+ TRACE_BEGIN(notify_added_device);
+
added_device_event = zalloc(sizeof *added_device_event);
post_base_event(device,
* pretend to free it */
free(added_device_event);
#endif
+ TRACE_END();
}
void
{
struct libinput_event_device_notify *removed_device_event;
+ TRACE_BEGIN(notify_removed_device);
+
removed_device_event = zalloc(sizeof *removed_device_event);
post_base_event(device,
* pretend to free it */
free(removed_device_event);
#endif
+ TRACE_END();
}
static inline bool
struct libinput_event_keyboard *key_event;
uint32_t seat_key_count;
- if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_KEYBOARD))
+ TRACE_BEGIN(keyboard_notify_key);
+
+ if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_KEYBOARD)) {
+ TRACE_END();
return;
+ }
key_event = zalloc(sizeof *key_event);
post_device_event(device, time,
LIBINPUT_EVENT_KEYBOARD_KEY,
&key_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_pointer *motion_event;
- if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_POINTER))
- return;
+ TRACE_BEGIN(pointer_notify_motion);
+ if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_POINTER)) {
+ TRACE_END();
+ return;
+ }
+
motion_event = zalloc(sizeof *motion_event);
*motion_event = (struct libinput_event_pointer) {
post_device_event(device, time,
LIBINPUT_EVENT_POINTER_MOTION,
&motion_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_pointer *motion_absolute_event;
- if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_POINTER))
+ TRACE_BEGIN(pointer_notify_motion_absolute);
+
+ if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_POINTER)) {
+ TRACE_END();
return;
+ }
motion_absolute_event = zalloc(sizeof *motion_absolute_event);
post_device_event(device, time,
LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE,
&motion_absolute_event->base);
+
+ TRACE_END();
}
void
struct libinput_event_pointer *button_event;
int32_t seat_button_count;
- if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_POINTER))
+ TRACE_BEGIN(pointer_notify_button);
+
+ if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_POINTER)) {
+ TRACE_END();
return;
+ }
button_event = zalloc(sizeof *button_event);
post_device_event(device, time,
LIBINPUT_EVENT_POINTER_BUTTON,
&button_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_pointer *axis_event;
- if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_POINTER))
+ TRACE_BEGIN(pointer_notify_axis);
+
+ if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_POINTER)) {
+ TRACE_END();
return;
+ }
axis_event = zalloc(sizeof *axis_event);
post_device_event(device, time,
LIBINPUT_EVENT_POINTER_AXIS,
&axis_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_touch *touch_event;
- if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_TOUCH))
+ TRACE_BEGIN(touch_notify_touch_down);
+
+ if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_TOUCH)) {
+ TRACE_END();
return;
+ }
touch_event = zalloc(sizeof *touch_event);
post_device_event(device, time,
LIBINPUT_EVENT_TOUCH_DOWN,
&touch_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_touch *touch_event;
- if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_TOUCH))
+ TRACE_BEGIN(touch_notify_touch_motion);
+
+ if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_TOUCH)) {
+ TRACE_END();
return;
+ }
touch_event = zalloc(sizeof *touch_event);
post_device_event(device, time,
LIBINPUT_EVENT_TOUCH_MOTION,
&touch_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_touch *touch_event;
- if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_TOUCH))
+ TRACE_BEGIN(touch_notify_touch_up);
+
+ if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_TOUCH)) {
+ TRACE_END();
return;
+ }
touch_event = zalloc(sizeof *touch_event);
post_device_event(device, time,
LIBINPUT_EVENT_TOUCH_UP,
&touch_event->base);
+
+ TRACE_END();
}
void