News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

wxScintilla - flickers badly on Ubuntu 9.10 + fix

Started by eranif, November 08, 2009, 04:48:04 PM

Previous topic - Next topic

eranif

Hi,

As part of a bug report I got from a user about my project, he complained that on the recent ubuntu release (karmic 9.10) the scintilla based editor flickers when 'brace matches' feature is ON (the ability to colour the matched brace in the editor when the caret is located near its sibling)

So as part of my investigation, I installed C::B 8.02 which is available in the ubuntu repositories, and I can confirm that C::B flickers as well.

Here is a youtube video that I first got with the bug reported:

http://www.youtube.com/watch?v=7TipIOQ945A
I can confirm that this bug exist in C::B as well as in wxSTC sample program

The fix is quite simple actually:
in wxscintilla.cpp, in the method: wxScintilla::OnPaint (wxPaintEvent& WXUNUSED(evt))
replace this:
wxPaintDC dc(this);
wiht this
#ifdef __WXGTK__
// On Mac / Windows there is no real need for this
    wxBufferedPaintDC dc(this);
#else
wxPaintDC dc(this);
#endif


Sorry for not providing patch, but our version of wxscintilla differs in more than just this change
Eran

ollydbg

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Jenna


eranif

Quote from: jens on November 08, 2009, 05:56:28 PM
Applied in trunk.

Many thanks for the patch Eran.
Anytime, I will let you guys know If I will fix any other interesting issues that might interest you as well  ;)

Eran

mandrav

Quote from: eranif on November 08, 2009, 06:03:13 PM
Quote from: jens on November 08, 2009, 05:56:28 PM
Applied in trunk.

Many thanks for the patch Eran.
Anytime, I will let you guys know If I will fix any other interesting issues that might interest you as well  ;)

Eran

Gosh, Eran, you 're a life saver :)
Thanks for this patch.
Be patient!
This bug will be fixed soon...

gasbank


choikwa

Umm... I'm a noob. Can anyone point out for me where to find wxscintilla.cpp file in ubuntu?

ollydbg

Quote from: choikwa on June 05, 2010, 03:38:19 AM
Umm... I'm a noob. Can anyone point out for me where to find wxscintilla.cpp file in ubuntu?
It is a file Inside the codeblocks' source code.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

choikwa

Does this mean I have to recompile it from terminal

Jenna

Quote from: choikwa on June 05, 2010, 06:11:49 PM
Does this mean I have to recompile it from terminal
For what purpose ?
The patch is included in trunk and therefore in the actual release.

infinigon

Quote from: choikwa on June 05, 2010, 06:11:49 PM
Does this mean I have to recompile it from terminal

Yes, patches are applied directly to source code, which means that if you want to patch Code::Blocks, you must build it again from source code. (Or you can wait for the next nightly build to be released)

Jenna

Quote from: infinigon on June 06, 2010, 04:49:29 PM
Quote from: choikwa on June 05, 2010, 06:11:49 PM
Does this mean I have to recompile it from terminal

Yes, patches are applied directly to source code, which means that if you want to patch Code::Blocks, you must build it again from source code. (Or you can wait for the next nightly build to be released)

For this patch this answer is bullshit, if he does not want to build a really old version of C::B (before revision 5902 from 2009-11-08).
Sorry for the hard words.

That's what I posted before:

Quote from: jens on June 05, 2010, 09:04:50 PM
Quote from: choikwa on June 05, 2010, 06:11:49 PM
Does this mean I have to recompile it from terminal
For what purpose ?
The patch is included in trunk and therefore in the actual release.

infinigon

Hahaha. I just noticed the date of this patch.  :lol:

Nevermind. Jens is right. Just go download the latest release and you'll be fine.