Re: [AD] Patch to prototype _xwin_handle_input

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


George Foot <george.foot@xxxxxxxxxx> writes:

> I'm not sure that it's good to have the interrupts disabled for
> so long, and thought about an alternate system, where the user
> sets a flag or increases a variable to show that they are doing
> X calls and don't want Allegro to do any in its timer handler.
> It's just a variable being tested before `_xwin_handle_input' is
> called in `xwin.c'.

It will be necessary to test that Xlib function is called before
calling any X function, because someone can call X functions from
xwin.c (directly or indirectly) inside timer procedure (e.g. vsync,
blit or set_palette).

> 
> I haven't made a patch for it though,
> because I don't know whether disabling the interrupts like this
> really is such a bad thing to do -- the only effect is on the
> actual Allegro timer system, which will miss a lot of
> interrupts, but it should catch up again later on.  If there's
> no problem here, it's probably not worth changing.

Why do you need to disable interrupts for a long time (and for how
long)?.

> 
> Back on the topic of the attached patch, is there any plan to go
> through `xwin.c' and prototype all the public routines there?  I
> don't need many of them, but I seem to keep sending patches to
> make them visible one by one.  Should I just make a big patch
> prototyping all of them?  I don't think I understand enough of X
> to decide what sort of things people will want access to,
> though.

All public routines should be prototyped in src/x/xwin.h, those
routines that were not prototyped should be static (or prototyped).
Perhaps, prototypes should be moved to public X specific header and
xwin.h can be removed completely.

-- 
Michael Bukin



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