wxStyledTextCtrl: Annoying flicker in wxGTK since r72578
|Reported by:||dghart||Owned by:|
|Keywords:||wxGTK wxStyledTextCtrl flicker||Cc:|
As predicted, the r72578 painting fix causes an unpleasant amount of flicker, for example when typing. This can be seen in the stc sample, but it's worse in a 'real' app. It doesn't happen with wxMSW, or in SciTE.
The problem seems to be that GetClientRectangle() returns a rect that's too large by 3 or 4 pixels, which causes paintState to be paintAbandoned too often. This can be shown, and the flicker cured, by the attached patch.
I suspect this is associated with, and perhaps caused by, the change in appearance that started in wxGTK-2.9.0. As you can see in the attached screenshot, which shows a 2.8 stc on top of a 2.9 one, there's now a thin extra 'border' just inside the scrollbars. I don't know why this happens, but it looks about the correct size.
After discovering this 'fix', I then saw the new comment in r12704. I confirm that the r12704 fix works for me too, and is less hackish. I hope one or the other will be applied before wx2.9.5 is released, but clearly a solution the underlying problem would be preferable.