summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-05-14 13:35:11 +0300
committerTor Lillqvist <tml@collabora.com>2019-05-16 13:24:42 +0300
commitd5c6efa206efe0ac99b136321b9ecf77c7c2392c (patch)
treef7b66c8f072ab70239e13b26adf69f9a0f09e219 /framework
parentb693fb5cf154b177dd03184c789a4ef6b2aaa833 (diff)
Don't call Application::Quit() in Desktop::terminate() on iOS
When exiting from a document in the iOS app, the Application::Quit() would post an ImplQuitMsg user event that would however not be handled for that document. Instead, it would be handled by the next document opened and thus the code would immediately stop editing the document, causing grief. Change-Id: Id24c843b3f329673035da55f53c2134265fce003
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/desktop.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index b3af82593e66..8a91db555c14 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -243,7 +243,11 @@ sal_Bool SAL_CALL Desktop::terminate()
if (bRestartableMainLoop)
{
+#ifndef IOS // or ANDROID?
+ // In the iOS app, posting the ImplQuitMsg user event will be too late, it will not be handled during the
+ // lifetime of the current document, but handled for the next document opened, which thus will break horribly.
Application::Quit();
+#endif
return true;
}
if ( ! bFramesClosed )