framework/source/services/autorecovery.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit c3cf88f73e29a79f890782b31d1ecc6ed1c376ea Author: Justin Luth <jl...@mail.com> AuthorDate: Tue Aug 8 11:44:48 2023 -0400 Commit: Justin Luth <jl...@mail.com> CommitDate: Wed Aug 9 04:10:48 2023 +0200 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 <jl...@mail.com> 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