diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-10 14:21:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-11 10:04:21 +0100 |
commit | 16a91006ca44da08fb436d70129e7a8cbff9e2d2 (patch) | |
tree | 91b428d63194608d932441d29737545bef2fbbd4 /vcl/source/window | |
parent | 81d5acda2c143ab1183c7dc6d2386cc1b28c9fcf (diff) |
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 <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/dockwin.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
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(); |