|
|
@ -70,17 +70,17 @@ TR_eventDispatcherStart(TR_EventDispatcher this) |
|
|
: NULL; |
|
|
: NULL; |
|
|
|
|
|
|
|
|
if (handler_queue) { |
|
|
if (handler_queue) { |
|
|
size_t idx = TR_queueFirst(handler_queue); |
|
|
|
|
|
|
|
|
size_t idx = TR_listFirst((TR_List)handler_queue); |
|
|
TR_EventDone done = TR_EVENT_PENDING; |
|
|
TR_EventDone done = TR_EVENT_PENDING; |
|
|
|
|
|
|
|
|
while (idx != TR_queueLast(handler_queue) + 1) { |
|
|
|
|
|
TR_EventHandler handler = handler_queue->data[idx]; |
|
|
|
|
|
|
|
|
while (idx != TR_listLast((TR_List)handler_queue) + 1) { |
|
|
|
|
|
TR_EventHandler handler = ((TR_List)handler_queue)->data[idx]; |
|
|
TR_EventDone this_done; |
|
|
TR_EventDone this_done; |
|
|
|
|
|
|
|
|
this_done = TR_eventHandlerHandleEvent(handler, event); |
|
|
this_done = TR_eventHandlerHandleEvent(handler, event); |
|
|
done = TR_EVENT_DONE == done ? done : this_done; |
|
|
done = TR_EVENT_DONE == done ? done : this_done; |
|
|
|
|
|
|
|
|
idx = idx + 1 == TR_queueSize(handler_queue) ? 0 : idx + 1; |
|
|
|
|
|
|
|
|
idx = idx + 1 == TR_queueSize((TR_List)handler_queue) ? 0 : idx + 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (TR_EVENT_DONE == done) { |
|
|
if (TR_EVENT_DONE == done) { |
|
|
|