summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-06-13 15:53:06 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-06-14 11:30:56 +0200
commit4046b51e6f6bd31b0188d9c00273a1761254a9d6 (patch)
tree32116091aac02878686880d643f176f9ef11275e
parenttdf#125563 Adapt adjustment values to binary shape geometry (diff)
downloadcore-4046b51e6f6bd31b0188d9c00273a1761254a9d6.tar.gz
core-4046b51e6f6bd31b0188d9c00273a1761254a9d6.zip
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.) (cherry picked from commit f4e0cc1ff145287f80738f070a8c46a64b2f76d1) Change-Id: I89768a1331f9dc1ea4508336723484d112156338 Reviewed-on: https://gerrit.libreoffice.org/74023 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--vcl/source/window/paint.cxx3
1 files changed, 3 insertions, 0 deletions
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);
}