Re: [AD] X11 unresponsiveness

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


> Here's what I propose.. since we seem to have a semi-working patch for 
> the signal based handler (Elias says the last patch I posted works 
> good), but not the best, we could use the signal-based aproach by 
> default. The only reason for that is that some people didn't really take 
> the warning seriously that some systems would require polling. However, 
> the *_needs_poll functions would return TRUE regardless, and when the 
> poll_* functions are called, that device is no longer auto-polled in the 
> handler.

Just to be sure I follow you correctly - you mean we could require
poll_keyboard() and poll_mouse() to be called regularly when using the sigalrm
version of the library?
I would prefer it if polling remained optional, but you are right: those
function are there already and the docs say that you should use them in case
future platforms need them.
A potential problem I see with this is that it changes behavior of the library
on a platform that is already supported.
If this works properly, I have no objections in principle, but then I do think
that keyboard_needs_poll() and mouse_needs_poll() should return FALSE on
platforms where it is not needed (such as the pthreads version of the library,
which already works fine with Elias's most recent patch) rather than forcing you
to poll even if it is not nescessary (which is the main reason I never liked
using them).

So in summary, I'm ok in principle, provided that the change in behavior doesn't
break the API backward compatibility on *nix and that those functions don't
enforce polling on systems that don't need it as they do now.
I'd still prefer Allegro to handle the polling though, so I'd see it as a last
resort or easy way out. ;)

Evert




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