Comment 32 for bug 1339539

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1339539] Re: pcbnew does not draw correctly the default canvas

On 2/14/2015 3:03 PM, Nick Østergaard wrote:
> 2015-01-25 21:04 GMT+01:00 Wayne Stambaugh <email address hidden>:
>> On 01/24/2015 08:29 AM, jean-pierre charras wrote:
>>> After some test both on Ubuntu 14.10 and Kubuntu 14.04 LTS, I am now
>>> pretty sure this is due to an issue with wxWidgets + gtk3.
>>>
>>> If I build wxWidgets (3.0.2) against gtk2 Kicad works fine.
>>> If I build wxWidgets (3.0.2) against gtk3 Kicad does not works.
>>>
>>> On gtk3, the wxWidgets --enable-graphics_ctx is always enabled (cannot be disabled).
>>> On gtk3, the wxWidgets --enable-graphics_ctx is not enabled by default.
>>>
>>> I never saw the wxWidgets drawing layer working well with the advanced graphics context 2D drawing API in enabled.
>>> A least the XOR mode widely used in Pcbnew and eeschema when moving objects does not work.
>>> On gtk3, looks like very small scaling factors (used in Pcbnew/Gerbview) are not working (certainly a serious bug in wxWidgets/gtk3+advanced graphics context) and few basic draw mode are not working, both on Linux and Windows.
>>>
>>> Currently the only one workaround I know is to build wxWidgets using
>>> gtk2 (this is the default)
>>>
>>
>> JP,
>>
>> I just finished testing this and yes build wxWidgets against GTK3 seems
>> to have some very serious issues. I may try disabling the graphics
>> context to see if thing get any better but the drawing and some of the
>> control window rendering is broken. I wonder if we are first to
>> discover this? I will also try building the latest wxWidgets source
>> from the repo to see if any of the issues have been resolved. Thanks
>> for figuring this out. We will definitely have to let users know so
>> they can make the appropriate build decisions.
>
> Hi Wayne,
>
> Did you get any further on this?

My testing has confirmed that building wxWidgets and wxPython against
gtk3 is a dead end at the moment. There is no easy path to making this
work. It will require a lot of code changes on our part or bug fixing
on wxWidgets developers part. Thankfully, Debian has chosen to stick
with gtk2. Maybe they found the issues we are now seeing with other
distros and decided sticking with gtk2 would be prudent at this time. I
would be more than happy to test patches to fix the gtk3 issues if
someone has the time. As of right now, I'm recommending to all of the
package devs use gtk2 when build wxWidgets and wxPython if you want to
keep KiCad usable. I know this is less than desirable but we just don't
have the time to fix it right now.

>
> I have just tried to rebuild wxgtk on Archlinux with gtk3 3.14.8,
> whilst on fedora 20 the gtk3 is 3.10.9. I can confirm that the issue
> appears. Also to note, is thet the eeschema canvas seem antialised
> when using gtk3, and it renders slower when zooming. And the issue
> with drawing wires blindly exists, this is also when moving objects.
>
> So just for reference it is confirmed that this issue is seen on
> fedora, ubuntu, gentoo and archliux if using --with=gtk3 for the wxgtk
> package.
>
> Also, Miguel Ajo has updated the fedora copr builds to use gtk2, hence
> if anyone on fedora stating it magically works... it is not so
> magical.
>