Re: [AD] Missing field in keyboard and mouse events

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, 2008-08-11 at 19:03 -0600, Trent Gamblin wrote:
> On Mon, August 11, 2008 5:08 pm, Peter Wang said:
> > We're also missing window focus-in and focus-out events.
> 
> Those are implemented on Windows now... as for the display fields in
> keyboard and mouse events, I'm not sure where to start yet.
> 

In X11, we already know the display for each event - so just need to
rename the above display field, then add a line of code for each event
to fill it in.

This reminds me, currently this is done for each event in
xglx/xsystem.c:

      // FIXME: With many windows, it's bad to loop through them all,
      // maybe can come up with a better system here.
      for (i = 0; i < _al_vector_size(&s->system.displays); i++) {
         ALLEGRO_DISPLAY_XGLX **dptr = _al_vector_ref(&s->system.displays, i);
         d = *dptr;
         if (d->window == event.xany.window) {
            break;
         }
      }

But with typically 1 or at most 2 windows, I guess we need no FIXME there..

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/