Author: jackson
Date: 2007-03-14 16:07:23 -0500 (Wed, 14 Mar 2007)
New Revision: 74304

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
Log:

        * TextBoxBase.cs: Need to display the caret after letting the
        * base
        wndproc handle the focus methods, because the caret display
        methods check the focus state.
        - Try to display the caret after updating it's position with
          SelectWord.
        - Don't need to do an immediate update on this recalc, since
          there
        will be an invalidate anyways.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-03-14 20:57:24 UTC (rev 74303)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-03-14 21:07:23 UTC (rev 74304)
@@ -1,5 +1,14 @@
 2007-03-14  Jackson Harper  <[EMAIL PROTECTED]>
 
+       * TextBoxBase.cs: Need to display the caret after letting the base
+       wndproc handle the focus methods, because the caret display
+       methods check the focus state.
+       - Try to display the caret after updating it's position with SelectWord.
+       - Don't need to do an immediate update on this recalc, since there
+       will be an invalidate anyways.
+
+2007-03-14  Jackson Harper  <[EMAIL PROTECTED]>
+
        * TreeView.cs: Some workarounds so that we can match event order a
        little better.
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2007-03-14 20:57:24 UTC (rev 74303)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2007-03-14 21:07:23 UTC (rev 74304)
@@ -1263,13 +1263,13 @@
                        }
 
                        case Msg.WM_SETFOCUS:
+                               base.WndProc(ref m);
                                document.CaretHasFocus ();
-                               base.WndProc(ref m);
                                break;
 
                        case Msg.WM_KILLFOCUS:
+                               base.WndProc(ref m);
                                document.CaretLostFocus ();
-                               base.WndProc(ref m);
                                break;
 
                        default:
@@ -1590,6 +1590,7 @@
 
                        document.SetSelection (document.caret.line, start, 
document.caret.line, end);
                        document.PositionCaret (document.selection_end.line, 
document.selection_end.pos);
+                       document.DisplayCaret ();
                }
 
                internal void CalculateDocument() {
@@ -1764,8 +1765,7 @@
                                                        
ThemeEngine.Current.ResPool.GetSolidBrush(ForeColor),
                                                        null, 
FormatSpecified.Font | FormatSpecified.Color);
                                }
-                               document.UpdateView (document.GetLine (1), 0);
-                               document.ResumeRecalc (true);
+                               document.ResumeRecalc (false);
 
                                // Make sure the caret height is matching the 
new font height
                                document.AlignCaret();

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to