vcl/source/window/paint.cxx | 3 +++ 1 file changed, 3 insertions(+) New commits: commit f4e0cc1ff145287f80738f070a8c46a64b2f76d1 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu Jun 13 15:53:06 2019 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Jun 13 21:49:35 2019 +0200
tdf#92079 vcl: fix missing image background on dialog from basic Regression from commit e5bb5c52aeaeb60c8592b004efd88c30242e03a1 (add RenderContext to Window::PushPaintHelper, use Erase correctly, 2015-05-18), the problem was the unconditional ApplySettings() call in the direct painting case. It's not clear what was the intent of that addition, since vcl::Window::ApplySettings() is virtual, and the default implementation is empty. But at least the Dialog subclass sets the background there, leading to the loss of the original bitmap background. Fix the problem by explicitly restoring the old background after ApplySettings() at least in the bitmap case. (Wallpaper is copy-on-write, so no problem to make a copy before ApplySettings() unconditionally.) Change-Id: I89768a1331f9dc1ea4508336723484d112156338 Reviewed-on: https://gerrit.libreoffice.org/73965 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 7f6e8124c0d1..fca72f214022 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -296,7 +296,10 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion) else { // direct painting + Wallpaper aBackground = m_pWindow->GetBackground(); m_pWindow->ApplySettings(*m_pWindow); + if (aBackground.IsBitmap()) + m_pWindow->SetBackground(aBackground); m_pWindow->PushPaintHelper(this, *m_pWindow); m_pWindow->Paint(*m_pWindow, m_aPaintRect); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits