summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-06-13 15:53:06 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2019-06-14 15:06:19 +0200
commit1fd61b1a2aac3e52f3c0a0ab8fbd3ff5170713c3 (patch)
tree78a8a74d0fb7d625845d55dbf1e2057e19f07260
parentResolves: tdf#125878 correct calculation of H:M:S from timestamp (diff)
downloadcore-1fd61b1a2aac3e52f3c0a0ab8fbd3ff5170713c3.tar.gz
core-1fd61b1a2aac3e52f3c0a0ab8fbd3ff5170713c3.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> (cherry picked from commit 4046b51e6f6bd31b0188d9c00273a1761254a9d6) Reviewed-on: https://gerrit.libreoffice.org/74034 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.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 0031baf60937..8d3f88e9dfce 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -295,7 +295,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);
}