[Libreoffice-commits] online.git: Mobile/Mobile
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 15 23:01:14 UTC 2018
Mobile/Mobile/AppDelegate.mm | 15 ++++++++-------
Mobile/Mobile/DocumentViewController.mm | 5 +++--
2 files changed, 11 insertions(+), 9 deletions(-)
New commits:
commit c701e875f6118d24ff0b9a7c3823f8f6c9570db0
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Oct 16 00:01:04 2018 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Oct 16 02:00:47 2018 +0300
iOS app work in progress on closing and re-opening a document
diff --git a/Mobile/Mobile/AppDelegate.mm b/Mobile/Mobile/AppDelegate.mm
index 6fbd25d75..eab0054f6 100644
--- a/Mobile/Mobile/AppDelegate.mm
+++ b/Mobile/Mobile/AppDelegate.mm
@@ -40,16 +40,17 @@ static LOOLWSD *loolwsd = nullptr;
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
^{
- if (loolwsd == nullptr)
- {
- loolwsd = new LOOLWSD();
- Util::setThreadName("app");
- }
+ assert(loolwsd == nullptr);
char *argv[2];
argv[0] = strdup([[NSBundle mainBundle].executablePath UTF8String]);
argv[1] = nullptr;
- loolwsd->run(1, argv);
- assert(false && "????? LOOLWSD::main() returned?");
+ Util::setThreadName("app");
+ while (true) {
+ loolwsd = new LOOLWSD();
+ loolwsd->run(1, argv);
+ delete loolwsd;
+ NSLog(@"One run of LOOLWSD completed");
+ }
});
return YES;
}
diff --git a/Mobile/Mobile/DocumentViewController.mm b/Mobile/Mobile/DocumentViewController.mm
index fc7f2deee..3d5e92c99 100644
--- a/Mobile/Mobile/DocumentViewController.mm
+++ b/Mobile/Mobile/DocumentViewController.mm
@@ -177,7 +177,7 @@
// the other end too just for cleanliness, even if a
// FakeSocket as such is not a system resource so nothing
// is saved by closing it.
- fakeSocketClose(self->closeNotificationPipeForForwardingThread[0]);
+ fakeSocketClose(self->closeNotificationPipeForForwardingThread[1]);
// Close our end of the fake socket connection to the
// ClientSession thread, so that it terminates
@@ -210,11 +210,12 @@
return;
} else if ([message.body isEqualToString:@"BYE"]) {
- NSLog(@"document window closed! Closing our end of the socket?");
+ NSLog(@"document window terminating on JavaScript side. Closing our end of the socket.");
// Close one end of the socket pair, that will wake up the forwarding thread above
fakeSocketClose(closeNotificationPipeForForwardingThread[0]);
+ [self dismissDocumentViewController];
return;
}
More information about the Libreoffice-commits
mailing list