summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-11-22 18:17:10 +0100
committerJan Holesovsky <kendy@collabora.com>2021-11-23 13:03:25 +0100
commit6b37e455a1ffbf2bc020e166642ad20a5f776bc1 (patch)
treeb321a01fe87a658c88adf3ca730af68161a89640
parentb633549af3168a05cbcc389abba5683358b150b8 (diff)
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 <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--vcl/source/window/paint.cxx35
1 files changed, 5 insertions, 30 deletions
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);
}