From d9c5d89d230b204a90cca4dee4165ba6ebdf00fd Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 21 Jan 2018 20:52:32 +0100 Subject: 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. --- src/gui/ConnectWindow.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/gui/ConnectWindow.cpp') 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 tsci( - new Client::ThreadedSigClientInterface()); + SPtr sci(new SigClientInterface()); + SPtr qi(new QueuedInterface(sci)); - SPtr iface(world->new_interface(uri, tsci)); + SPtr 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 = dynamic_ptr_cast(world->interface()); if (client) { - _app->attach(dynamic_ptr_cast(client->respondee())); + _app->attach(client->respondee()); _app->register_callbacks(); } else { error("Connected with invalid client interface type"); -- cgit v1.2.1