Kaydet (Commit) 8e9c36df authored tarafından Ashod Nakashian's avatar Ashod Nakashian Kaydeden (comit) Jan Holesovsky

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/71846Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
Tested-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst c76f89ed
......@@ -929,8 +929,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");
......@@ -1022,7 +1022,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:
......@@ -1106,6 +1106,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:
{
......@@ -1118,16 +1119,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment