]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/textctrl.cpp
added a couple of base classes
[wxWidgets.git] / src / mac / carbon / textctrl.cpp
index c84b8fa71497f3154454e628229fd43d8596c08b..0fbd547e59f423324b1562a4670643c1c98bcb72 100644 (file)
@@ -999,6 +999,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
                 // This is necessary (don't know why);
                 // otherwise the tab will not be inserted.
                 WriteText(wxT("\t"));
+                eat_key = true;
             }
             break;
 
@@ -2485,7 +2486,6 @@ void wxMacMLTEClassicControl::MacUpdatePosition()
         wxMacWindowClipper cl( textctrl ) ;
 
 #ifdef __WXMAC_OSX__
-        bool isCompositing = textctrl->MacGetTopLevelWindow()->MacUsesCompositing() ;
         if ( m_sbHorizontal || m_sbVertical )
         {
             int w = bounds.right - bounds.left ;
@@ -2500,9 +2500,6 @@ void wxMacMLTEClassicControl::MacUpdatePosition()
                 sbBounds.right = w + 1 ;
                 sbBounds.bottom = h + 1 ;
 
-                if ( !isCompositing )
-                    OffsetRect( &sbBounds , m_txnControlBounds.left , m_txnControlBounds.top ) ;
-
                 SetControlBounds( m_sbHorizontal , &sbBounds ) ;
                 SetControlViewSize( m_sbHorizontal , w ) ;
             }
@@ -2516,9 +2513,6 @@ void wxMacMLTEClassicControl::MacUpdatePosition()
                 sbBounds.right = w + 1 ;
                 sbBounds.bottom = m_sbHorizontal ? h - 14 : h + 1 ;
 
-                if ( !isCompositing )
-                    OffsetRect( &sbBounds , m_txnControlBounds.left , m_txnControlBounds.top ) ;
-
                 SetControlBounds( m_sbVertical , &sbBounds ) ;
                 SetControlViewSize( m_sbVertical , h ) ;
             }
@@ -2607,13 +2601,10 @@ wxInt16 wxMacMLTEClassicControl::MacControlUserPaneHitTestProc(wxInt16 x, wxInt1
         else
         {
             // sometimes we get the coords also in control local coordinates, therefore test again
-            if ( textctrl->MacGetTopLevelWindow()->MacUsesCompositing() )
-            {
-                int x = 0 , y = 0 ;
-                textctrl->MacClientToRootWindow( &x , &y ) ;
-                where.h += x ;
-                where.v += y ;
-            }
+            int x = 0 , y = 0 ;
+            textctrl->MacClientToRootWindow( &x , &y ) ;
+            where.h += x ;
+            where.v += y ;
 
             if (PtInRect( where, &m_txnControlBounds ))
                 result = kControlEditTextPart ;
@@ -2631,14 +2622,12 @@ wxInt16 wxMacMLTEClassicControl::MacControlUserPaneTrackingProc( wxInt16 x, wxIn
     if ( (textctrl != NULL) && textctrl->MacIsReallyShown() )
     {
         Point startPt = { y , x } ;
+
         // for compositing, we must convert these into toplevel window coordinates, because hittesting expects them
-        if ( textctrl->MacGetTopLevelWindow()->MacUsesCompositing() )
-        {
-            int x = 0 , y = 0 ;
-            textctrl->MacClientToRootWindow( &x , &y ) ;
-            startPt.h += x ;
-            startPt.v += y ;
-        }
+        int x = 0 , y = 0 ;
+        textctrl->MacClientToRootWindow( &x , &y ) ;
+        startPt.h += x ;
+        startPt.v += y ;
 
         switch (MacControlUserPaneHitTestProc( startPt.h , startPt.v ))
         {