desktop/source/lib/init.cxx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
New commits: commit 95f1f2143ae53469417fcebc9b2020c34b53ff30 Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Tue Apr 16 18:24:26 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Apr 16 20:51:53 2024 +0200 lok: elide various unhelpful events during background save. In particular TEXT_SELECTION and TABLE_SELECTED seem to be favorites, but nothing good would come of getting these others either. Change-Id: I1f014824452bffaeddb1dfaf6565542c3c7c9e91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166158 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 1c047116a22d..04c46306f12e 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1697,6 +1697,29 @@ void CallbackFlushHandler::queue(const int type, CallbackData& aCallbackData) SAL_INFO("lok", "Queue: [" << type << "]: [" << aCallbackData.getPayload() << "] on " << m_queue1.size() << " entries."); + if (comphelper::LibreOfficeKit::isForkedChild()) + { + // In background mode - avoid any extraneous or confusing messages + switch (type) + { + case LOK_CALLBACK_INVALIDATE_TILES: + case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR: + case LOK_CALLBACK_TEXT_SELECTION: + case LOK_CALLBACK_CURSOR_VISIBLE: + case LOK_CALLBACK_GRAPHIC_SELECTION: + case LOK_CALLBACK_TABLE_SELECTED: + case LOK_CALLBACK_SET_PART: + case LOK_CALLBACK_DOCUMENT_SIZE_CHANGED: + case LOK_CALLBACK_MOUSE_POINTER: + case LOK_CALLBACK_INVALIDATE_HEADER: + case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY: + SAL_INFO("lok", "Elide event in background save mode"); + return; + default: + break; + } + } + bool bIsChartActive = false; bool bIsComment = false; if (type == LOK_CALLBACK_GRAPHIC_SELECTION)