From 16a91006ca44da08fb436d70129e7a8cbff9e2d2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 10 Mar 2021 14:21:42 +0000 Subject: allow throwing away size cache of hosted container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9d6eb1af80526c4853d695af3e269187569a538c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112271 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- vcl/source/window/dockwin.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'vcl/source/window') diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 6834317c87ff..3b622cf1cd73 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -1115,6 +1115,22 @@ ResizableDockingWindow::ResizableDockingWindow(vcl::Window* pParent, WinBits nSt { } +// needed to blow away the cached size of the boundary between vcl and hosted child widget +void ResizableDockingWindow::InvalidateChildSizeCache() +{ + // find the bottom vcl::Window of the hierarchy and queue_resize on that + // one will invalidate all the size caches upwards + vcl::Window* pChild = GetWindow(GetWindowType::FirstChild); + while (true) + { + vcl::Window* pSubChild = pChild->GetWindow(GetWindowType::FirstChild); + if (!pSubChild) + break; + pChild = pSubChild; + } + pChild->queue_resize(); +} + ResizableDockingWindow::~ResizableDockingWindow() { disposeOnce(); -- cgit