Re: [AD] MSG_IDLE in grabber and menus

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


> 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).

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?

-- 
Eric Botcazou




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