Author: jpobst
Date: 2007-09-20 12:28:43 -0400 (Thu, 20 Sep 2007)
New Revision: 86074

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
Log:
2007-09-20  Jonathan Pobst  <[EMAIL PROTECTED]>

        * TextControl.cs: Do not tell the system to move the cursor if the
        textbox isn't focused.  Fixes part of bug #322668.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-09-20 16:25:30 UTC (rev 86073)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-09-20 16:28:43 UTC (rev 86074)
@@ -1,5 +1,10 @@
 2007-09-20  Jonathan Pobst  <[EMAIL PROTECTED]>
 
+       * TextControl.cs: Do not tell the system to move the cursor if the
+       textbox isn't focused.  Fixes part of bug #322668.
+
+2007-09-20  Jonathan Pobst  <[EMAIL PROTECTED]>
+
        * ComboBox.cs: When there are no items, do not show the dropdown if
        the down arrow is clicked.  Fixes part of bug #322668.
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2007-09-20 16:25:30 UTC (rev 86073)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2007-09-20 16:28:43 UTC (rev 86074)
@@ -1630,10 +1630,11 @@
                                }
                        }
 
-                       XplatUI.SetCaretPos(owner.Handle, 
(int)caret.tag.line.widths[caret.pos] + caret.line.X - viewport_x, caret.line.Y 
+ caret.tag.shift - viewport_y + caret_shift);
-
-                       DisplayCaret ();
-
+                       if (owner.Focused) {
+                               XplatUI.SetCaretPos(owner.Handle, 
(int)caret.tag.line.widths[caret.pos] + caret.line.X - viewport_x, caret.line.Y 
+ caret.tag.shift - viewport_y + caret_shift);
+                               DisplayCaret ();
+                       }
+                       
                        if (CaretMoved != null) CaretMoved(this, 
EventArgs.Empty);
                }
 

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

Reply via email to