From 3319e2dfa3ab5b1732777323da92d08b9ee42b8e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 11 Oct 2007 05:25:32 +0000 Subject: Fix initial state of radio buttons in connect window when running ingen -eg. Move all GTK main stuff into a single callback (control order better, avoid scheduler overhead). Speed up client GTK thread event processing rate. Eliminate buffering of post-processed events when running internal engine (post-process events directly in GTK thread). git-svn-id: http://svn.drobilla.net/lad/ingen@873 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/gui/App.cpp | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) (limited to 'src/libs/gui/App.cpp') diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp index d9bac842..fde2fdaa 100644 --- a/src/libs/gui/App.cpp +++ b/src/libs/gui/App.cpp @@ -170,7 +170,7 @@ App::run(int argc, char** argv, void -App::attach(SharedPtr engine, SharedPtr client) +App::attach(SharedPtr engine, SharedPtr client) { assert( ! _engine); assert( ! _client); @@ -185,9 +185,6 @@ App::attach(SharedPtr engine, SharedPtr(new ThreadedLoader(engine)); _patch_tree_window->init(*_store); - - Glib::signal_timeout().connect(sigc::mem_fun(this, &App::animate_callback), - 100, G_PRIORITY_DEFAULT_IDLE); } @@ -235,7 +232,7 @@ App::port_activity(Port* port) bool -App::animate_callback() +App::animate() { for (ActivityPorts::iterator i = _activity_ports.begin(); i != _activity_ports.end() ; ) { ActivityPorts::iterator next = i; @@ -255,21 +252,6 @@ App::animate_callback() } -/* -bool -App::idle_callback() -{ - _client_hooks->process_events(); - -#ifdef HAVE_LASH - //if (lash_controller->enabled()) - // lash_controller->process_events(); -#endif - - return true; -} -*/ - /******** Event Handlers ************/ @@ -351,11 +333,17 @@ App::event_save_session_as() bool App::gtk_main_iteration() { - if (_world->local_engine) + if (!_client) + return false; + + if (_world->local_engine) { _world->local_engine->main_iteration(); + } else { + _client->emit_signals(); + } + + animate(); - _client->emit_signals(); - return true; } -- cgit v1.2.1