[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 15 14:20:34 UTC 2020
vcl/source/window/paint.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit d6304a7db28f92bbe5cd98648aa133d64c05b5ff
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu May 14 12:31:55 2020 +0200
Commit: Caolán McNamara <caolanm at 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 <caolanm at 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);
}
More information about the Libreoffice-commits
mailing list