Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: eranif on November 08, 2009, 04:48:04 pm

Title: wxScintilla - flickers badly on Ubuntu 9.10 + fix
Post by: eranif on November 08, 2009, 04:48:04 pm
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 (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:
Code
	wxPaintDC dc(this);
wiht this
Code
#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
Title: Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
Post by: ollydbg on November 08, 2009, 04:56:26 pm
You are so kind and nice!!!
Title: Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
Post by: Jenna on November 08, 2009, 05:56:28 pm
Applied in trunk.

Many thanks for the patch Eran.
Title: Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
Post by: eranif on November 08, 2009, 06:03:13 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
Title: Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
Post by: mandrav on November 09, 2009, 03:01:10 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.
Title: Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
Post by: gasbank on November 11, 2009, 07:00:09 am
That was quite annoying to me, too.
Thanks Eran!!
Title: Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
Post by: 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?
Title: Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
Post by: ollydbg on June 05, 2010, 05:43:20 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.
Title: Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
Post by: choikwa on June 05, 2010, 06:11:49 pm
Does this mean I have to recompile it from terminal
Title: Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
Post by: Jenna on June 05, 2010, 09:04:50 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.
Title: Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
Post by: infinigon on June 06, 2010, 04:49:29 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)
Title: Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
Post by: Jenna on June 06, 2010, 04:54:14 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:

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.
Title: Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
Post by: infinigon on June 06, 2010, 05:45:30 pm
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.