reintroducing non-composited functionality due to DataBrowser Bugs under 10.2

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2005-02-27 09:10:52 +00:00
parent 9b89f11ad8
commit 789ae0cfa2
8 changed files with 264 additions and 214 deletions

View File

@@ -240,20 +240,21 @@ void wxToolBarTool::SetPosition(const wxPoint& position)
m_x = position.x;
m_y = position.y;
if ( IsButton() )
int x , y ;
x = y = 0 ;
int mac_x = position.x ;
int mac_y = position.y ;
if ( ! GetToolBar()->MacGetTopLevelWindow()->MacUsesCompositing() )
{
int x , y ;
x = y = 0 ;
int mac_x = position.x ;
int mac_y = position.y ;
#ifdef __WXMAC_OSX__
// already correctly set up
#else
WindowRef rootwindow = (WindowRef) GetToolBar()->MacGetTopLevelWindowRef() ;
GetToolBar()->MacWindowToRootWindow( &x , &y ) ;
mac_x += x;
mac_y += y;
#endif
}
if ( IsButton() )
{
Rect contrlRect ;
GetControlBounds( m_controlHandle , &contrlRect ) ;
int former_mac_x = contrlRect.left ;
@@ -273,11 +274,6 @@ void wxToolBarTool::SetPosition(const wxPoint& position)
{
// separator
#ifdef __WXMAC_OSX__
int x , y ;
x = y = 0 ;
int mac_x = position.x ;
int mac_y = position.y ;
Rect contrlRect ;
GetControlBounds( m_controlHandle , &contrlRect ) ;
int former_mac_x = contrlRect.left ;