summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2020-01-29 12:09:27 +0100
committerAndras Timar <andras.timar@collabora.com>2020-05-17 11:34:36 +0200
commit45fba9cf381aa43ee5bf71a5e47c1f6afb253063 (patch)
tree677cbafe56eafc183fd3f625da79d77508ebbe68 /editeng
parentaa5c2b63f623906bed30996d2fd979f8cf3a2487 (diff)
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 <marco.cecchetti@collabora.com> Tested-by: Marco Cecchetti <marco.cecchetti@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90070 Tested-by: Jenkins
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editview.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 8c7ab6058e8e..ec4aae63b63a 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -486,6 +486,10 @@ void EditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bActivat
if (pImpEditView->mpViewShell && !bActivate)
{
+ VclPtr<vcl::Window> 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);
@@ -499,6 +503,10 @@ void EditView::HideCursor(bool bDeactivate)
if (pImpEditView->mpViewShell && !bDeactivate)
{
+ VclPtr<vcl::Window> 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);