- if (USE_TRACEF(TRACE_IEVENT)) {
- _trace_slot(sp, "after mouse event queue compaction:");
- _tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d",
- RunParams(sp, eventp, runp),
- runcount);
- _nc_unlock_global(tracef);
+ if (first_valid != NULL) {
+ if (USE_TRACEF(TRACE_IEVENT)) {
+ _trace_slot(sp, "after mouse event queue compaction:");
+ _tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d",
+ RunParams(sp, first_invalid, first_valid),
+ runcount);
+ _nc_unlock_global(tracef);
+ }
+ for (ep = first_valid; ep != first_invalid; ep = NEXT(ep)) {
+ if (ep->id != INVALID_EVENT)
+ TR(MY_TRACE,
+ ("_nc_mouse_parse: returning composite mouse event %s at slot %ld",
+ _nc_tracemouse(sp, ep),
+ (long) IndexEV(sp, ep)));
+ }