diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-06-13 15:53:06 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-06-13 21:49:35 +0200 |
commit | f4e0cc1ff145287f80738f070a8c46a64b2f76d1 (patch) | |
tree | 841ee3fc024fb04dd42b0066af893d2491660e0b /vcl | |
parent | 54afdbd1b442d93313a01e58dba8fe3b84f596d1 (diff) |
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 <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/paint.cxx | 3 |
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); } |