kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone

Blame SOURCES/0021-lokdocview-fix-render-calls-after-LOK-callbacks.patch

135360
From 0dec0cdd711d87ec1741b4b66e8060d2f13a4496 Mon Sep 17 00:00:00 2001
135360
From: Pranav Kant <pranavk@gnome.org>
135360
Date: Sat, 6 Jun 2015 00:36:54 +0530
135360
Subject: [PATCH 021/398] lokdocview: fix render calls after LOK callbacks
135360
135360
Change-Id: Ib33f0e1dcf257350be1e2cf6c49cd92494472a55
135360
(cherry picked from commit 085f31a435eed43e3b7927e10309ddd00fb5b9a5)
135360
---
135360
 libreofficekit/source/gtk/lokdocview.cxx | 10 +++-------
135360
 1 file changed, 3 insertions(+), 7 deletions(-)
135360
135360
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
135360
index 42dd14cb34ed..6c3176783953 100644
135360
--- a/libreofficekit/source/gtk/lokdocview.cxx
135360
+++ b/libreofficekit/source/gtk/lokdocview.cxx
135360
@@ -949,21 +949,18 @@ gboolean LOKDocView_Impl::callbackImpl(CallbackData* pCallback)
135360
         {
135360
             GdkRectangle aRectangle = LOKDocView_Impl::payloadToRectangle(pCallback->m_aPayload.c_str());
135360
             setTilesInvalid(aRectangle);
135360
-            renderDocument(0);
135360
         }
135360
         else
135360
-        {
135360
             m_pTileBuffer->resetAllTiles();
135360
-            renderDocument(0);
135360
-        }
135360
+
135360
+        gtk_widget_queue_draw(m_pDrawingArea);
135360
     }
135360
     break;
135360
     case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
135360
     {
135360
         m_aVisibleCursor = LOKDocView_Impl::payloadToRectangle(pCallback->m_aPayload.c_str());
135360
         m_bCursorOverlayVisible = true;
135360
-        setTilesInvalid(m_aVisibleCursor);
135360
-        renderDocument(0);
135360
+        gtk_widget_queue_draw(m_pDrawingArea);
135360
     }
135360
     break;
135360
     case LOK_CALLBACK_TEXT_SELECTION:
135360
@@ -1030,7 +1027,6 @@ gboolean LOKDocView_Impl::callbackImpl(CallbackData* pCallback)
135360
         gtk_widget_set_size_request(m_pDrawingArea,
135360
                                     twipToPixel(m_nDocumentWidthTwips, m_fZoom),
135360
                                     twipToPixel(m_nDocumentHeightTwips, m_fZoom));
135360
-        m_pTileBuffer->resetAllTiles();
135360
     }
135360
     break;
135360
     case LOK_CALLBACK_SET_PART:
135360
-- 
135360
2.12.0
135360