kicad-developers team mailing list archive
Mailing list archive
Re: OSX suggestions.
Sun, 30 Mar 2008 18:40:46 -0000
> The most serious issue, which makes KiCAD not work on Mac, is the
> previously discussed issues related to invalid use of graphics
> contexts with wxWidgets-2.8. Earlier, it was possible to revert to
> wxWidgets-2.6, but this old version is not maintained any longer, and
> fails to build on Leopard.
I've done some investigations and the change that makes the graphics work
on 2.6 and not on 2.8 is the variable wxMAC_USE_CORE_GRAPHICS in setup.h that changes its status
from 0 in 2.6 to 1 in 2.8.
This setting enables as default CoreGraphics (Quartz) on opposite of the old QuickDraw Routines.
Limitation of the CoreGraphics is the possibility for only one wxDC interact with an entire window.
The sad thing of all that is that in wx 3.0 old QuickDraw Routines will be purged out.
> To fix this properly (i.e. using the native wxWidgets-2.8), I think
> KiCAD's drawing code should be reorganized to only redraw when
> triggered from a paint event. My peeks into this so far indicates that
> this is mainly an issue with statusbar rendering, as well as redraws
> while reading a design file. The problems are most visible in the
> pcbnew app.
I've a proposal for the msgpanel.cpp that follows to mitigate that effect.
> Another missing piece is making the CMake build system work for the
> Mac port.
I'vent much experience on CMake, old makefiles should work for a lot in thewhile :)
> Unfortunately, I don't have enough time to spare to dig into these
> issues, but I'm more than willing to help out testing, discussing,
> code reviewing etc.
Seems enough ;)
--- common/msgpanel.cpp (revision 949)
+++ common/msgpanel.cpp (working copy)
@@ -43,9 +43,9 @@
wxPaintDC dc( this );
- //EraseMsgBox( &dc );
+ EraseMsgBox( &dc );
dc.SetBackground( *wxBLACK_BRUSH );
dc.SetBackgroundMode( wxSOLID );
@@ -136,8 +136,11 @@
m_Items.push_back( item );
showItem( dc, item );
@@ -172,9 +175,14 @@
/* Effacement de la fenetre d'affichage des messages de bas d'ecran
wxClientDC dc( this );
EraseMsgBox( &dc );
@@ -200,7 +208,8 @@
DC->DrawRectangle( 0, 0, size.x, size.y );
DC->SetBrush( wxNullBrush );
DC->SetPen( wxNullPen );