How is it not working? Are the events just not being dequeued? Is it crashing? The code looks correct, from what I can follow with a quick read-through.
My queue is somewhat different... It's just one global list. The event holds a pointer to its owner, and the event type is used to determine what that should be cast to (I never got in the habit of using unions..). The bucket idea is interesting, I am going to think about using it. The owner doesn't have a list, but in extract_char or whatever, there is a call to strip_queue that removes all the events owned by it from the global list. The action taken when the event fires is hard coded based on the event type, though a lot of the events are merely there to allow progs to be hooked in and have no action associated with them (in truth most events don't ever make it to the queue, but I have kept the interface mostly consistent).

