Re: [AD] X11 unresponsiveness |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Tue, 2004-07-13 at 19:17 -0700, Chris wrote:
> > Doesn't seem like a hack at all.
>
> What I'm saying is like a hack is changing the global _xwin_handle_input
> and its static _xwin_private_handle_input pairing (which is mirrored
> with the other _xwin* functions) just because the signal-based function
> calling and X can't get along.. for which we already have a solution
> (polling).
>
Well, my view is a bit different. The _private doesn't mean it is
private in file scope, but private with regards to the X lock. So,
completely irrelevant to being static or not. About 4.0.x compatibility,
I really don't know. I was under the impression only global symbols can
have an effect on ABI compatibility (but probably I'm wrong).
> > Definitely better than
> > the previous way of just dropping input.
>
> Actually, input isn't dropped. It just stays in X's queue until the
> signal input handler can finally read it (at which point it seems to
> only read 5 events at a time.. which 5 really is fine otherwise).
>
True. But well, the effect is the same.
> > I agree, we should additionally encourage polling for the signals
> > version.
>
> And I think the best way to encourage it is to not bandage up the
> relatively small issue (laggy input) of a bigger problem (calling X
> routines in a timer/signal). I personally think the signal input handler
> should be dropped completely for a pure polling-based method.. however,
> I also realize that too many current programs didn't head the warning
> that some platforms may *require* polling. Though until one such
> platform comes along, I don't think anyone will take the warning seriously.
>
Yes. But the thing is, we have a very small patch, which actually
improves the signals version a bit. So I see no reason to not apply it.
Admitted, the improvement does not affect the general problem. But
actually *requiring* polling would be a big step. After all this years
where we got away without it. And then taking a possible improvement as
the time to introduce it. So, my view is, *encourage* using polling by
stating it in the docs, and adjusting all the examples to query the
driver if polling is required and do it in that case. But seeing how the
signals version apparently is the original X11 port, and has worked for
so long (at least for Vincent), I think we can keep it working without
polling for now (and add that patch to even improve it in some
admittedly hopefully rare cases).
--
Elias Pschernig