[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Mon Oct 5 19:53:12 UTC 2020
vcl/source/window/window2.cxx | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
New commits:
commit 0eb85f9ac13d089bda58e7a7ef68c5b4bbb0c2a8
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Sep 30 19:09:32 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Oct 5 21:52:35 2020 +0200
Allow invalidate after queue_resize for lok in sidebar
This is a fix for regression introduced by
61a35560cb412d7ab0e3d0574eec4a790e3b9dfd
Sidebar wasn't properly refreshed in Online eg.
in Impress change 'Background' in sidebar 'Slide' deck
to 'Color' -> resulted in overlapping content
Change-Id: Id64f5d8694908d28cf5fa9787b65e555fb317e35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103724
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 92d62792feb5..61ea3d80c3d0 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1320,6 +1320,19 @@ void Window::InvalidateSizeCache()
pWindowImpl->mnOptimalHeightCache = -1;
}
+static bool HasParentDockingWindow(const vcl::Window* pWindow)
+{
+ while( pWindow )
+ {
+ if( pWindow->IsDockingWindow() )
+ return true;
+
+ pWindow = pWindow->GetParent();
+ }
+
+ return pWindow && pWindow->IsDockingWindow();
+}
+
void Window::queue_resize(StateChangedType eReason)
{
if (IsDisposed())
@@ -1355,7 +1368,12 @@ void Window::queue_resize(StateChangedType eReason)
if (VclPtr<vcl::Window> pParent = GetParentWithLOKNotifier())
{
Size aSize = GetSizePixel();
- if (aSize.getWidth() > 0 && aSize.getHeight() > 0 && GetParentDialog()
+
+ // Form controls (VCL controls inside document window) was causing
+ // infinite loop of calls, so call it only for widgets having as a parent
+ // dialog or docking window (eg. sidebar)
+ if (aSize.getWidth() > 0 && aSize.getHeight() > 0
+ && (GetParentDialog() || HasParentDockingWindow(this))
&& !pParent->IsInInitShow())
LogicInvalidate(nullptr);
}
More information about the Libreoffice-commits
mailing list