Author Topic: wxScintilla - flickers badly on Ubuntu 9.10 + fix  (Read 12927 times)

Offline eranif

  • Regular
  • ***
  • Posts: 256
wxScintilla - flickers badly on Ubuntu 9.10 + fix
« 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
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

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
« Reply #1 on: November 08, 2009, 04:56:26 pm »
You are so kind and nice!!!
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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
« Reply #2 on: November 08, 2009, 05:56:28 pm »
Applied in trunk.

Many thanks for the patch Eran.

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
« Reply #3 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

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
« Reply #4 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.
Be patient!
This bug will be fixed soon...

gasbank

  • Guest
Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
« Reply #5 on: November 11, 2009, 07:00:09 am »
That was quite annoying to me, too.
Thanks Eran!!

Offline choikwa

  • Single posting newcomer
  • *
  • Posts: 2
Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
« Reply #6 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?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
« Reply #7 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.
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.

Offline choikwa

  • Single posting newcomer
  • *
  • Posts: 2
Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
« Reply #8 on: June 05, 2010, 06:11:49 pm »
Does this mean I have to recompile it from terminal

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
« Reply #9 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.

Offline infinigon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
« Reply #10 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)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
« Reply #11 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.

Offline infinigon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: wxScintilla - flickers badly on Ubuntu 9.10 + fix
« Reply #12 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.