summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorJustin Luth <jluth@mail.com>2023-08-08 11:44:48 -0400
committerJustin Luth <jluth@mail.com>2023-08-09 04:10:48 +0200
commitc3cf88f73e29a79f890782b31d1ecc6ed1c376ea (patch)
tree90ff9fbba2a34fee3004c941140a1d7817fd18a9 /framework
parent383e68da6c429c243c1e7be6699acaa942b712bc (diff)
tdf#144512 autorecovery: only wait once for user idle
If we currently are in a user idle state, then don't delay any recovery / autosave's until a future idle timeout. Change-Id: Ie3953bb7456370d046b76a4cad816498dbfc85e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155462 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/autorecovery.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index dbf0c803aab6..b4e898952aad 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -2327,7 +2327,9 @@ IMPL_LINK_NOARG(AutoRecovery, implts_timerExpired, Timer *, void)
// force save of all currently open documents
// The called method returns an info, if and how this
// timer must be restarted.
- AutoRecovery::ETimerType eSuggestedTimer = implts_saveDocs(true/*bAllowUserIdleLoop*/, false);
+ const bool bIsAlreadyIdle(m_eTimerType == AutoRecovery::E_POLL_FOR_USER_IDLE);
+ AutoRecovery::ETimerType eSuggestedTimer
+ = implts_saveDocs(/*AllowUserIdleLoop=*/!bIsAlreadyIdle, /*RemoveLockFiles=*/false);
// If timer is not used for "short callbacks" (means polling
// for special states) ... reset the handle state of all