diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-04-12 14:53:20 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-04-17 13:18:42 +0200 |
commit | 0578bbb22b7def7cb52e497751d3b1822020bdc1 (patch) | |
tree | 514f479cd407b849f59ed441d7871af1704b531d | |
parent | 9ae69d6fe95e1c59c8179ad5c7c019e8ba4621de (diff) |
Related: tdf#100925 background not getting set under X sometimes
not sure why this is the case, but it is reminiscent of rhbz#1283420 which
results in missing glyphs in some circumstances
X11CairoTextRender::getCairoContext has a hack in it for that problem, whic
forces a read from the underlying X Drawable before writing to it which seems
to have the effect of syncing it up.
So, just before drawing the bg, draw a glyph on it to get it synced, and then
overwrite it.
Change-Id: I2ffff7e8e989b91821869d8b75a59728ac513d1b
Reviewed-on: https://gerrit.libreoffice.org/52818
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit ccb90e3266336d6b022c48ec90cd55450c9c209e)
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index b191fa90feb6..87256ff16847 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1021,7 +1021,12 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI } // paint the background - rDevice.DrawRect(rDevice.PixelToLogic(aBackground)); + tools::Rectangle aLogicRect(rDevice.PixelToLogic(aBackground)); + //tdf#100925, rhbz#1283420, Draw some text here, to get + //X11CairoTextRender::getCairoContext called, so that the forced read + //from the underlying X Drawable gets it to sync. + rDevice.DrawText(aLogicRect.BottomLeft(), " "); + rDevice.DrawRect(aLogicRect); // paint the editeng text tools::Rectangle aEditRect(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH())); |