vcl/source/window/paint.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit d6304a7db28f92bbe5cd98648aa133d64c05b5ff Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu May 14 12:31:55 2020 +0200 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri May 15 16:20:01 2020 +0200 tdf#132788 vcl: fix redraw on theme change Regression from commit f4e0cc1ff145287f80738f070a8c46a64b2f76d1 (tdf#92079 vcl: fix missing image background on dialog from basic, 2019-06-13), the original scenario was about an unexpected change from bitmap wallpaper to a non-bitmap one. That means the condition for the above change can be more strict: just restore the old wallpaper if it's now a non-bitmap one, otherwise leave it alone. This way the above scenario keeps working and changing themes again doesn't require a restart of the process. (cherry picked from commit 52389ed19da6bcfdedef909532913ff3e2ab4afc) Change-Id: I256372ad30184cc150d6819dd61cdd38af7d83ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94194 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index a99ae752de45..6e6b8b4bfe6c 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -302,9 +302,11 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion) // direct painting Wallpaper aBackground = m_pWindow->GetBackground(); m_pWindow->ApplySettings(*m_pWindow); - // Restore lost bitmap background. - if (aBackground.IsBitmap()) + // Restore bitmap background if it was lost. + if (aBackground.IsBitmap() && !m_pWindow->GetBackground().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