Re: [AD] Missing field in keyboard and mouse events |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2008-08-12, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> 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..
Eh, for a small number of windows it might even be optimal.
Peter