include/vcl/dockwin.hxx | 1 + vcl/source/window/dockwin.cxx | 16 ++++++++++++++++ 2 files changed, 17 insertions(+)
New commits: commit 16a91006ca44da08fb436d70129e7a8cbff9e2d2 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Mar 10 14:21:42 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Mar 11 10:04:21 2021 +0100 allow throwing away size cache of hosted container Change-Id: I9d6eb1af80526c4853d695af3e269187569a538c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112271 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx index 8dbe5ead00a4..afca81622a2f 100644 --- a/include/vcl/dockwin.hxx +++ b/include/vcl/dockwin.hxx @@ -248,6 +248,7 @@ protected: public: ResizableDockingWindow(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame> &rFrame = css::uno::Reference<css::frame::XFrame>()); + void InvalidateChildSizeCache(); ResizableDockingWindow(vcl::Window* pParent, WinBits nStyle); virtual ~ResizableDockingWindow() override; virtual void dispose() override; 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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits