summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-05-05 12:36:09 -0400
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-25 12:01:50 +0200
commit19b6115e3edc62f0ccd1449a28d368f23698624d (patch)
tree03e2324601529374be39681a7d43b98d0b475079 /desktop
parent3b1c1b0d2f5348d2eea761b452c9f7ce940dc737 (diff)
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@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 8e9c36dfc346387abfbbaefbc15a518cbe3e257c) Reviewed-on: https://gerrit.libreoffice.org/76286 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx17
1 files changed, 4 insertions, 13 deletions
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);