[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 27 09:45:33 UTC 2019
vcl/source/window/window.cxx | 1 +
1 file changed, 1 insertion(+)
New commits:
commit a730ce1c5043c65fb61b34d4e9ffb9c7c9ad5b86
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Aug 12 17:57:25 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Aug 27 11:44:24 2019 +0200
tdf#126808 vcl: fix crash due to leaking the frame's buffer vdev
This vdev is used to do vcl-level double-buffering, which is off by
default, but e.g. listboxes/comboboxes use it to avoid flicker with
Windows GDI.
The root cause was introduced in commit
ea5e83abcfa1406c401b8a1ec91efda65373b74b (tdf#92982 vcl: stop
creating/disposing the paint buffer in PaintHelper, 2015-07-30), which
removed the explicit mpBuffer.disposeAndClear() in the PaintHelper dtor,
but forgot to explicitly dispose it elsewhere.
This is now a much more visible problem since commit
d4714b0fdb81e6e561ae526cc517ecc9a40a603e (tdf#101978 vcl
combobox/listbox floating window: avoid flicker, 2019-06-17) as the
infrastructure is used for all list/comboboxes.
Fix the problem by explicitly disposing the vdev before deleting the
frame data, so the underlying GDI resource is released, even if we have
a reference cycle.
Change-Id: Ia217bbd78780a214308e497044e73e378ee8ecd6
Reviewed-on: https://gerrit.libreoffice.org/77370
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
(cherry picked from commit e71093c0bc52426647a9d3a41ac0643bbc6cb0c6)
Reviewed-on: https://gerrit.libreoffice.org/77395
Reviewed-by: Xisco FaulĂ <xiscofauli at libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/77915
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index d86f2fe51d7b..5f66921a23aa 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -557,6 +557,7 @@ void Window::dispose()
assert (mpWindowImpl->mpFrameData->mnFocusId == nullptr);
assert (mpWindowImpl->mpFrameData->mnMouseMoveId == nullptr);
+ mpWindowImpl->mpFrameData->mpBuffer.disposeAndClear();
delete mpWindowImpl->mpFrameData;
mpWindowImpl->mpFrameData = nullptr;
}
More information about the Libreoffice-commits
mailing list