From 538dc87c56cd5c796c67d2be60be007e519505c9 Mon Sep 17 00:00:00 2001 From: Marco Cecchetti Date: Wed, 29 Jan 2020 12:09:27 +0100 Subject: lok: avoid to send visible cursor msg for formula bar edit view Cursor visible msg should be sent only if the window linked to the edit view is the document window. Change-Id: Ib4001dbddd191b06fa02d5b8ddab14460270b327 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87680 Reviewed-by: Marco Cecchetti Tested-by: Marco Cecchetti Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90070 Tested-by: Jenkins --- editeng/source/editeng/editview.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index b793a68b071f..315f9ef6716f 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -478,6 +478,10 @@ void EditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bActivat if (pImpEditView->mpViewShell && !bActivate) { + VclPtr pParent = pImpEditView->pOutWin->GetParentWithLOKNotifier(); + if (pParent && pParent->GetLOKWindowId() != 0) + return; + OString aPayload = OString::boolean(true); pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, aPayload.getStr()); pImpEditView->mpViewShell->NotifyOtherViews(LOK_CALLBACK_VIEW_CURSOR_VISIBLE, "visible", aPayload); @@ -491,6 +495,10 @@ void EditView::HideCursor(bool bDeactivate) if (pImpEditView->mpViewShell && !bDeactivate) { + VclPtr pParent = pImpEditView->pOutWin->GetParentWithLOKNotifier(); + if (pParent && pParent->GetLOKWindowId() != 0) + return; + OString aPayload = OString::boolean(false); pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, aPayload.getStr()); pImpEditView->mpViewShell->NotifyOtherViews(LOK_CALLBACK_VIEW_CURSOR_VISIBLE, "visible", aPayload); -- cgit