[Libreoffice-commits] core.git: vcl/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Thu May 14 11:14:59 UTC 2020
vcl/source/window/paint.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 52389ed19da6bcfdedef909532913ff3e2ab4afc
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu May 14 12:31:55 2020 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu May 14 13:14:24 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.
Change-Id: I256372ad30184cc150d6819dd61cdd38af7d83ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94189
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index c9cdd199e6e4..7a9e24a71e6f 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