diff options
author | David Robillard <d@drobilla.net> | 2018-01-21 20:52:32 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-01-22 00:20:19 +0100 |
commit | d9c5d89d230b204a90cca4dee4165ba6ebdf00fd (patch) | |
tree | bfef33474927a6c22f723fcc849d8df801f618e9 /src/gui/ConnectWindow.cpp | |
parent | 7150b9bc10511e17abdd6e528fd1317522f64eae (diff) | |
download | ingen-d9c5d89d230b204a90cca4dee4165ba6ebdf00fd.tar.gz ingen-d9c5d89d230b204a90cca4dee4165ba6ebdf00fd.tar.bz2 ingen-d9c5d89d230b204a90cca4dee4165ba6ebdf00fd.zip |
Only enqueue messages when the engine is remote
When the engine is local, messages are emitted in the Gtk thread and applied
immediately. This should make the GUI more responsive.
Diffstat (limited to 'src/gui/ConnectWindow.cpp')
-rw-r--r-- | src/gui/ConnectWindow.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index 8f235264..623db4a0 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -29,11 +29,12 @@ #include "ingen/Interface.hpp" #include "ingen/Log.hpp" #include "ingen/Module.hpp" +#include "ingen/QueuedInterface.hpp" #include "ingen/World.hpp" #include "ingen/client/ClientStore.hpp" #include "ingen/client/GraphModel.hpp" +#include "ingen/client/SigClientInterface.hpp" #include "ingen/client/SocketClient.hpp" -#include "ingen/client/ThreadedSigClientInterface.hpp" #include "ingen_config.h" #include "App.hpp" @@ -194,13 +195,13 @@ ConnectWindow::connect_remote(const URI& uri) { Ingen::World* world = _app->world(); - SPtr<ThreadedSigClientInterface> tsci( - new Client::ThreadedSigClientInterface()); + SPtr<SigClientInterface> sci(new SigClientInterface()); + SPtr<QueuedInterface> qi(new QueuedInterface(sci)); - SPtr<Ingen::Interface> iface(world->new_interface(uri, tsci)); + SPtr<Ingen::Interface> iface(world->new_interface(uri, qi)); if (iface) { world->set_interface(iface); - _app->attach(tsci); + _app->attach(qi); _app->register_callbacks(); return true; } @@ -231,7 +232,7 @@ ConnectWindow::connect(bool existing) _connect_stage = 1; SPtr<Client::SocketClient> client = dynamic_ptr_cast<Client::SocketClient>(world->interface()); if (client) { - _app->attach(dynamic_ptr_cast<Client::SigClientInterface>(client->respondee())); + _app->attach(client->respondee()); _app->register_callbacks(); } else { error("Connected with invalid client interface type"); |