vcl/source/window/paint.cxx |   35 +++++------------------------------
 1 file changed, 5 insertions(+), 30 deletions(-)

New commits:
commit 6b37e455a1ffbf2bc020e166642ad20a5f776bc1
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Mon Nov 22 18:17:10 2021 +0100
Commit:     Jan Holesovsky <ke...@collabora.com>
CommitDate: Tue Nov 23 13:03:25 2021 +0100

    avoid only painting to windows in LOK mode, not invalidations
    
    9b73d3e8926d5f9b10464d19b539eef3eb088f50 disabled painting
    to windows in LOK mode, because it doesn't make sense as
    those windows are not even visible, but it tried to do it
    by avoiding even invalidations. That can trigger problems
    because some dialogs actually are forwarded to clients in LOK
    mode, and apparently they need the invalidations to proceed
    normally (the Format->Cell dialog in Online didn't repaint
    scrolling of the Date listbox, I don't know what exactly
    the actual problem was, but mnPaintFlags were different
    than when not avoiding invalidations).
    
    So revert most of the relevant commits and keep only avoiding
    actual drawing, which is what 057968bbce406efe6564347329df45b7e
    did.
    
    Change-Id: I4e212966830f4c690e6143b9d5fedbc24619e1ed
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125673
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 29f34de4f53c..425c6c19118c 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -646,13 +646,6 @@ void Window::ImplCallOverlapPaint()
 
 IMPL_LINK_NOARG(Window, ImplHandlePaintHdl, Timer *, void)
 {
-    if (comphelper::LibreOfficeKit::isActive())
-    {
-        // Tiled rendering is used, idle paint does not need to do anything.
-        mpWindowImpl->mpFrameData->maPaintIdle.Stop();
-        return;
-    }
-
     comphelper::ProfileZone aZone("VCL idle re-paint");
 
     // save paint events until layout is done
@@ -671,6 +664,9 @@ IMPL_LINK_NOARG(Window, ImplHandlePaintHdl, Timer *, void)
     else if ( mpWindowImpl->mbReallyVisible )
     {
         ImplCallOverlapPaint();
+        if (comphelper::LibreOfficeKit::isActive() &&
+            mpWindowImpl->mpFrameData->maPaintIdle.IsActive())
+            mpWindowImpl->mpFrameData->maPaintIdle.Stop();
     }
 }
 
@@ -691,12 +687,6 @@ IMPL_LINK_NOARG(Window, ImplHandleResizeTimerHdl, Timer *, 
void)
 
 void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, 
InvalidateFlags nFlags )
 {
-    if (comphelper::LibreOfficeKit::isActive())
-    {
-        // Tiled rendering is used, so there's no need to invalidate for idle 
painting.
-        return;
-    }
-
     // set PAINTCHILDREN for all parent windows till the first OverlapWindow
     if ( !ImplIsOverlapWindow() )
     {
@@ -758,12 +748,6 @@ void Window::ImplInvalidateFrameRegion( const vcl::Region* 
pRegion, InvalidateFl
 
 void Window::ImplInvalidateOverlapFrameRegion( const vcl::Region& rRegion )
 {
-    if (comphelper::LibreOfficeKit::isActive())
-    {
-        // Tiled rendering is used, so there's no need to invalidate for idle 
painting.
-        return;
-    }
-
     vcl::Region aRegion = rRegion;
 
     ImplClipBoundaries( aRegion, true, true );
@@ -794,12 +778,6 @@ void Window::ImplInvalidateParentFrameRegion( vcl::Region& 
rRegion )
 
 void Window::ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags 
nFlags )
 {
-    if (comphelper::LibreOfficeKit::isActive())
-    {
-        // Tiled rendering is used, so there's no need to invalidate for idle 
painting.
-        return;
-    }
-
     // check what has to be redrawn
     bool bInvalidateAll = !pRegion;
 
@@ -1203,11 +1181,8 @@ void Window::Invalidate( const tools::Rectangle& rRect, 
InvalidateFlags nFlags )
     tools::Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect );
     if ( !aRect.IsEmpty() )
     {
-        if (!comphelper::LibreOfficeKit::isActive())
-        {   // ImplInvalidate() immediatelly returns in LOK mode, skip useless 
Region construction
-            vcl::Region aRegion( aRect );
-            ImplInvalidate( &aRegion, nFlags );
-        }
+        vcl::Region aRegion( aRect );
+        ImplInvalidate( &aRegion, nFlags );
         tools::Rectangle aLogicRectangle(rRect);
         LogicInvalidate(&aLogicRectangle);
     }

Reply via email to