← Back to team overview

kicad-developers team mailing list archive

[Mac OSX] Changes for wx2.9/ Mac x86_64

 

I was in the last days trying to compile correctly wx libraries with support of the mayor 3 architectures (x86,x86_64,ppc).
Just to make know to who has not a full knowledge of OSX, x86_64 has a partial port of Carbon and this has forced a speedier change to the new APIs COCOA.
First problems encountered with kicad is the Carbon portion of code, then there are problems with the toolbar that i wish to "attack" in this weekend.
As usual i've changed the ifdefs to have the lighter impact possible over the code.

Now, if nobody has something against i wish to propose to add an optional define to switch base class for WinEDA_Toolbar from wxToolbar to wxAuiToolbar, sadly Combo Menus doesn't work correctly with native toobar on my platform.

--
Marco



Index: 3d-viewer/3d_frame.cpp
===================================================================
--- 3d-viewer/3d_frame.cpp	(revision 2005)
+++ 3d-viewer/3d_frame.cpp	(working copy)
@@ -127,7 +127,7 @@
config->Read( wxT( "BgColor_Blue" ),
&g_Parm_3D_Visu.m_BgColor.m_Blue, 0.0 );
}
-#ifdef __WXMAC__
+#if defined( __WXMAC__ ) && !defined( __WXOSX_COCOA__ )
 
// for macOSX, the window must be below system (macOSX) toolbar
if( m_FramePos.y < GetMBarHeight() )
Index: common/basicframe.cpp
===================================================================
--- common/basicframe.cpp	(revision 2005)
+++ common/basicframe.cpp	(working copy)
@@ -117,7 +117,7 @@
}
 
// Ensure Window title bar is visible
-#ifdef __WXMAC__
+#if defined( __WXMAC__ ) && !defined( __WXOSX_COCOA__ )
 
// for macOSX, the window must be below system (macOSX) toolbar
Ypos_min = GetMBarHeight();