wmperry(a)aventail.com (William M. Perry) writes:
I removed the static-ness of enqueue_command_event(). I can't
use
unread-command-events, because mouse-motion events screw that up. With
this approach, everything works beautifully.
My question is, is this a completely bad way to achieve my goals? I want
to insert arbitrary events into the data stream from outside event-stream.c
or any of the event-XXX.c files. I could find no other way to do it.
Well. enqueue_command_event() is already accessible from outside of
event-stream.c by means of the wrappers for misc_user and magic_eval
events.
The biggest thing I have against this is that mouse_motion events are
not command-events. The over solution would be to maintain your own
que for stuff you want to insert and then put your own wrappers in
event_stream's
int (*event_pending_p) (int);
void (*next_event_cb) (struct Lisp_Event *);
slots. Then you set these to drain your own queue first and call the
original if empty.
Jan