diff options
Diffstat (limited to 'libs/gtkmm2ext/gtk_ui.cc')
-rw-r--r-- | libs/gtkmm2ext/gtk_ui.cc | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index 33f6bbc864..8064b6cae7 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -33,6 +33,8 @@ #include <pbd/pthread_utils.h> #include <pbd/stacktrace.h> +#include <gtkmm2ext/gtkapplication.h> + #include <gtkmm2ext/gtk_ui.h> #include <gtkmm2ext/textviewer.h> #include <gtkmm2ext/popup.h> @@ -103,6 +105,7 @@ UI::UI (string namestr, int *argc, char ***argv) register_thread (pthread_self(), X_("GUI")); + gtk_application_init (); } UI::~UI () @@ -585,30 +588,12 @@ UI::popup_error (const std::string& text) } #ifdef GTKOSX -extern "C" { - int gdk_quartz_in_carbon_menu_event_handler (); -} +extern int gdk_quartz_in_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; @@ -625,7 +610,6 @@ UI::flush_pending () bool UI::just_hide_it (GdkEventAny *ev, Window *win) { - cerr << "++++ JUST HIDING " << win->get_window() << endl; win->hide (); return true; } |