summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-11-22 18:17:10 +0100
committerLuboš Luňák <l.lunak@collabora.com>2021-11-23 14:31:16 +0100
commit1728367684602bb897fd9a8518c40b071cb55a22 (patch)
tree8f420d1e6db276f7507414fd9848f66001b5497e /vcl/source
parent5d01e747270722ad9216ace8e782c7dfac5d744e (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/+/125674 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/source')
-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 1c983ff7b37a..b2b7db7b6557 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -647,13 +647,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
@@ -672,6 +665,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();
}
}
@@ -692,12 +688,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() )
{
@@ -759,12 +749,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 );
@@ -795,12 +779,6 @@ void Window::ImplInvalidateParentFrameRegion( const 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;
@@ -1180,11 +1158,8 @@ void Window::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags )
tools::Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect );
if ( !aRect.IsEmpty() )
{
- if (!comphelper::LibreOfficeKit::isActive())
- { // ImplInvalidate() immediately 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);
}