Re: [AD] MSG_IDLE in grabber and menus

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


On Mon, 2004-01-12 at 10:45, Eric Botcazou wrote:
> > Haven't menus been made non-blocking? In that case, there should be no
> > call to yield_timeslice() forced from the menu code.
> 
> Yes, this is the reason.  There should be no call to yield_timeslice as long 
> as user code can run simultaneously.  This means:
> - with update_menu and update_dialog (obviously, as Elias said),
> - with do_dialog() when no menu is active.
> 
> So we could automatically call yield_timeslice() with do_dialog() when a menu 
> is active (we already do that with do_menu).
> 

Makes sense to me.

> 
> Now the other problem: what happens when there is a d_yield_proc in a dialog 
> which is drived by update_dialog()?  As long as no menu is active, 
> yield_timeslice is called but it is not called any longer when a menu is 
> opened.  Obviously not very nice.  So we really need to detect the presence 
> of d_yield_proc in the second case.
> 
> Does this sound like an acceptable compromise?

Hm, yes, to me it does. Just should be mentioned in the docs that
d_yield_proc is an exception, and deriving other dialog objects off it
(calling it inside MSG_IDLE of something else) has not the same effect.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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