summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-12 14:53:20 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2018-04-30 12:07:34 +0200
commit3e89c5ec55dd5eedbd2b3822f14e73a486beef13 (patch)
tree8348fe508fbe0e3031652d7fd64ef4759a54e3ff /sc
parent49c15d8acfc513855e016c7f2cc9f9eaccd6be0b (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/52819 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit e8080c79043a7d9036f27cc24b76b7ff21c58da8) Reviewed-on: https://gerrit.libreoffice.org/53657 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin4.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 74151217831c..adb2db31a1df 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1029,7 +1029,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()));