vcl/source/window/window.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 67c3b3becab2aa2b9522e3a092d46bfe507c3101
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed May 17 14:03:28 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed May 17 20:27:55 2023 +0200

    tdf#63130 when getting the size, do not do a full paint
    
    otherwise we end up doing double work when called from
    ImplWindowFrameProc, which is the main driver of painting on the screen
    
    This reduces the load time by 10%
    
    Change-Id: I9eb82a180344875f707fbf3d8128351a35def6a8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151879
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index e52ee1b33b47..1aa22918d520 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2416,7 +2416,11 @@ Size Window::GetSizePixel() const
     {
         VclPtr<vcl::Window> xWindow( const_cast<Window*>(this) );
         mpWindowImpl->mpFrameData->maResizeIdle.Stop();
-        mpWindowImpl->mpFrameData->maResizeIdle.Invoke( nullptr );
+        // This is a copy of the code inside the resize Idle callback
+        // __except__ that we are not calling the paint idle callback
+        // which we don't want to do here, to avoid double work.
+        if( mpWindowImpl->mbReallyVisible )
+            xWindow->ImplCallResize();
         if( xWindow->isDisposed() )
             return Size(0,0);
     }

Reply via email to