[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - editeng/source

Marco Cecchetti (via logerrit) logerrit at kemper.freedesktop.org
Wed Jan 29 11:24:30 UTC 2020


 editeng/source/editeng/editview.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 16e4049f480698c3e1308a3711238a89f91b5c13
Author:     Marco Cecchetti <marco.cecchetti at collabora.com>
AuthorDate: Wed Jan 29 12:09:27 2020 +0100
Commit:     Marco Cecchetti <marco.cecchetti at collabora.com>
CommitDate: Wed Jan 29 12:24:02 2020 +0100

    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 at collabora.com>
    Tested-by: Marco Cecchetti <marco.cecchetti at collabora.com>

diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index aab666131456..2854314004b1 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -479,6 +479,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);
@@ -492,6 +496,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);


More information about the Libreoffice-commits mailing list