Stefan Seefeld <[EMAIL PROTECTED]> writes:
> Nathaniel Smith wrote:
> >
> > I found the bug in GGI::Visual that was preventing events from being
> > forwarded; had to fill in the event.any.target field, or it was discarded
> > by ggiEventSend.
>
> strange. Why is this needed ? Events are sent to visuals. So what is the target
> good for ? The SendEvent already takes the visual as argument. It seems redundant
> somehow...
Wrong, events are sent to the entity specified by the target field.
Currently this is either one of:
GII_EV_TARGET_ALL /* Broadcast event */
GII_EV_TARGET_QUEUE /* Just queue the event */
or a valid input id (input id's are reported in the origin field
of generated events).
This is true for both giiEventSend() and ggiEventSend(). To a visual
you can only send the command events that are recognized by the
visual, and you must use ggiEventSend().
Note that when sending events to the queue in a memory visual you
aren't really sending them to the visual, but to the virtual
inputlib created by the memory visual.
However there are some flaws and unfixed things in the current
*EventSend() system, so a redesign will probably happen before
the final release is made.
//Marcus
--
-------------------------------+------------------------------------
Marcus Sundberg | http://www.stacken.kth.se/~mackan
Royal Institute of Technology | Phone: +46 707 452062
Stockholm, Sweden | E-Mail: [EMAIL PROTECTED]