Re: [AD] MSG_IDLE in grabber and menus |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Wed, 2004-01-07 at 10:11, Eric Botcazou wrote:
> > Hm, sounds kludgy. Someone might 'derive' an object off d_yield_proc or
> > call yield_timeslice/al_sleep(0)[at least in my patched up version :)]
> > in the MSG_IDLE handler of some other dialog.
>
> Then he should resort to your solution, since he chose to manually solve the
> timeslice problem. But I don't see why the user who chose the canonical
> solution should have anything more to do.
>
Yes, I agree. Otherwise do_dialog would silently have gone deprecated if
it contains a d_menu_proc (the grabber being the main reason for the GUI
- and do_dialog not used there anymore..).
So the solution would be, while a d_menu_proc is active - scan the
dialog for d_yield_proc entries. Maybe another, similiar solution would
be to introduce a new flag - D_IDLE, which keeps objects active during
menu display.
Scanning for d_yield_proc has the advantage that old code which needs
the yield_timeslice and therefore uses d_yield_proc magically improves..
so maybe it's a better approach. (Or - add another kludge and scan for
both the proc and the flag - or make the proc set the flag.) Anyway,
it's all very simple changes with the current version of gui.c :)
--
Elias Pschernig <elias@xxxxxxxxxx>