summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp2
-rw-r--r--src/gui/ConnectWindow.cpp15
2 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index 4d108c71..525a5885 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -162,7 +162,7 @@ App::attach(SharedPtr<SigClientInterface> client)
assert(!_loader);
if (_world->local_engine()) {
- _world->local_engine()->register_client(client->uri(), client.get());
+ _world->local_engine()->register_client(client->uri(), client);
}
_client = client;
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index 4d26e61c..b08efb85 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -157,13 +157,19 @@ ConnectWindow::connect(bool existing)
uri = user_uri;
}
- if (existing)
+ if (existing) {
uri = world->engine()->uri().str();
+ }
- // Create client-side listener
- SharedPtr<ThreadedSigClientInterface> tsci(new ThreadedSigClientInterface(1024));
+ SharedPtr<ThreadedSigClientInterface> tsci;
+ if (world->engine()) {
+ tsci = PtrCast<ThreadedSigClientInterface>(
+ world->engine()->respondee());
+ }
- world->set_engine(world->interface(uri, tsci));
+ if (!tsci) {
+ world->set_engine(world->interface(uri, tsci));
+ }
_app->attach(tsci);
_app->register_callbacks();
@@ -203,6 +209,7 @@ ConnectWindow::connect(bool existing)
SharedPtr<SigClientInterface> client(new SigClientInterface());
+ world->engine()->set_respondee(client);
_app->attach(client);
_app->register_callbacks();