Merge with 2.0-ongoing R3071.

git-svn-id: svn://localhost/ardour2/branches/3.0@3074 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2008-02-16 22:55:47 +00:00
parent 8aa9508c82
commit 859e9106e7
57 changed files with 2551 additions and 249 deletions

View file

@ -560,10 +560,31 @@ UI::popup_error (const char *text)
pup->touch ();
}
#ifdef GTKOSX
extern "C" {
int gdk_quartz_in_carbon_menu_event_handler ();
}
#endif
void
UI::flush_pending ()
{
#ifdef GTKOSX
/* as of february 11th 2008, gtk/osx has a problem in that mac menu events
are handled using Carbon with an "internal" event handling system that
doesn't pass things back to the glib/gtk main loop. this makes
gtk_main_iteration() block if we call it while in a menu event handler
because glib gets confused and thinks there are two threads running
g_main_poll_func().
this hack (relies on code in gtk2_ardour/sync-menu.c) works
around that.
*/
if (gdk_quartz_in_carbon_menu_event_handler()) {
return;
}
#endif
if (!caller_is_ui_thread()) {
error << "non-UI threads cannot call UI::flush_pending()"
<< endmsg;