Re: [AD] MSG_IDLE in grabber and menus

[ Thread Index | Date Index | More Archives ]

> I think, both changes should be made.

It's ok to add d_yield_proc to whatever dialog structure you want (but do not 
forget to update the positional #defines if any).

> I'm not sure how it should be done in the menu case. I think I remember, it
> was left as an open problem in the last big GUI change.

Yes, I originally put a yield_timeslice() but I later removed it because of 
valid concerns.

> Maybe add a menu callback? Something like:
> yield_callback = my_idle_function;
> The menu code, as well as d_yield_proc, then could call that function.
> Or maybe leave d_yield_proc - and add a new gui_menu_callback, which is
> called as long as a menu is active.

I'd prefer to avoid the callback.  Would it be feasible to detect whether the 
dialog structure (the d_menu_proc object comes from) contains a d_yield_proc 
object and, in this case, to automatically call yield_timeslice() in the menu 
updating code?

Eric Botcazou

Mail converted by MHonArc 2.6.19+