Kaydet (Commit) 75dba661 authored tarafından Caolán McNamara's avatar Caolán McNamara

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/52810Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst f0b3e224
...@@ -1021,7 +1021,12 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI ...@@ -1021,7 +1021,12 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
} }
// paint the background // 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 // paint the editeng text
tools::Rectangle aEditRect(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH())); tools::Rectangle aEditRect(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment