[ Thread Index |
| More lists.liballeg.org/allegro-developers Archives
On 13 Jul 2011, at 1:45 , Matthew Leverton wrote:
> Any volunteers for the OS X implementation?
I'd be happy to, but it'll take me a little while since we're moving at the moment...
> I messed around with it a bit tonight, and it seemed pretty simple to
> implement. I got the menu creation almost working, but it was buggy
> like there were race conditions affecting it.
I suspect it would need to be done from the main thread.
> Ideally, the system menu would automatically be updated/recreated
> every time an Allegro display gets focus (since the menu is per
> display), but in the worst case, we could add an
> al_refresh_system_menu(void) function that the user would have to
> manually call when a display gains focus.
I gave some thought to that. Essentially, I think the functions for updating the menus should be part of our view delegate (so in the core), but exposed in a public api to the user through the addon. That way the system menu can be updated when an Allegro window gains focus automatically and we keep our book-keeping in one place. This seems the easiest way to organise things.