[Libreoffice-commits] core.git: desktop/source

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 25 10:02:32 UTC 2019


 desktop/source/lib/init.cxx |   17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

New commits:
commit 19b6115e3edc62f0ccd1449a28d368f23698624d
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun May 5 12:36:09 2019 -0400
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jul 25 12:01:50 2019 +0200

    LOK: remove duplicate cursor invalidations for same view only
    
    This limits duplicate cursor invalidation removal to same
    view only, which seems to have been left in error.
    
    We should now remove any old cursor invalidations (for
    the same view) and only keep the latest (current) one.
    
    Change-Id: Ie2323d0c5fcf3977576a1bdc098c95351a5753e0
    Reviewed-on: https://gerrit.libreoffice.org/71846
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>
    (cherry picked from commit 8e9c36dfc346387abfbbaefbc15a518cbe3e257c)
    Reviewed-on: https://gerrit.libreoffice.org/76286
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a1487e3790da..7d497f031013 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -945,8 +945,8 @@ CallbackFlushHandler::CallbackFlushHandler(LibreOfficeKitDocument* pDocument, Li
 {
     SetPriority(TaskPriority::POST_PAINT);
 
-    // Add the states that are safe to skip duplicates on,
-    // even when not consequent.
+    // Add the states that are safe to skip duplicates on, even when
+    // not consequent (i.e. do no emmit them if unchanged from last).
     m_states.emplace(LOK_CALLBACK_TEXT_SELECTION, "NIL");
     m_states.emplace(LOK_CALLBACK_GRAPHIC_SELECTION, "NIL");
     m_states.emplace(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, "NIL");
@@ -1038,7 +1038,7 @@ void CallbackFlushHandler::queue(const int type, const char* data)
         case LOK_CALLBACK_GRAPHIC_SELECTION:
         case LOK_CALLBACK_GRAPHIC_VIEW_SELECTION:
         case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
-        case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR :
+        case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR:
         case LOK_CALLBACK_STATE_CHANGED:
         case LOK_CALLBACK_MOUSE_POINTER:
         case LOK_CALLBACK_CELL_CURSOR:
@@ -1122,6 +1122,7 @@ void CallbackFlushHandler::queue(const int type, const char* data)
             case LOK_CALLBACK_CELL_VIEW_CURSOR:
             case LOK_CALLBACK_GRAPHIC_VIEW_SELECTION:
             case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR:
+            case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
             case LOK_CALLBACK_TEXT_VIEW_SELECTION:
             case LOK_CALLBACK_VIEW_CURSOR_VISIBLE:
             {
@@ -1134,16 +1135,6 @@ void CallbackFlushHandler::queue(const int type, const char* data)
             }
             break;
 
-            case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
-            {
-                removeAll(
-                    [type, &payload] (const queue_type::value_type& elem) {
-                        return (elem.Type == type && elem.PayloadString == payload);
-                    }
-                );
-            }
-            break;
-
             case LOK_CALLBACK_INVALIDATE_TILES:
             {
                 RectangleAndPart& rcNew = aCallbackData.setRectangleAndPart(payload);


More information about the Libreoffice-commits mailing list