Author: toshok
Date: 2007-01-10 21:00:12 -0500 (Wed, 10 Jan 2007)
New Revision: 70827

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/UpDownBase.cs
Log:
        * UpDownBase.cs (.ctor): remove the ActiveControl assignment here.
        It breaks in the face of the new ActiveControl stuff, and should
        be unnecessary.

        * Form.cs (WndProc): in the WM_ACTIVATE case, we need to set the
        activecontrol's focus if it's not already set, after we set
        ActiveControl, but before we call OnActivated.  Re-fixes #79667
        after the previous focus/active control fixes regressed it.

        * Control.cs: reindent some code.
        
2007-01-10  Chris Toshok  <[EMAIL PROTECTED]>



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-01-11 01:00:05 UTC (rev 70826)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-01-11 02:00:12 UTC (rev 70827)
@@ -1,5 +1,18 @@
 2007-01-10  Chris Toshok  <[EMAIL PROTECTED]>
 
+       * UpDownBase.cs (.ctor): remove the ActiveControl assignment here.
+       It breaks in the face of the new ActiveControl stuff, and should
+       be unnecessary.
+
+       * Form.cs (WndProc): in the WM_ACTIVATE case, we need to set the
+       activecontrol's focus if it's not already set, after we set
+       ActiveControl, but before we call OnActivated.  Re-fixes #79667
+       after the previous focus/active control fixes regressed it.
+
+       * Control.cs: reindent some code.
+       
+2007-01-10  Chris Toshok  <[EMAIL PROTECTED]>
+
        * Splitter.cs: clearing some outstanding changes from my tree.
        Replace all accesses (not writes) to the internal dock_style field
        with the Dock property.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2007-01-11 01:00:05 UTC (rev 70826)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2007-01-11 02:00:12 UTC (rev 70827)
@@ -4709,10 +4709,10 @@
 
                        case Msg.WM_SETFOCUS: {
                                if (!has_focus) {                
-                    if (this.Parent != null && this.Parent.ContainerSelected)
-                        return;
-                    this.has_focus = true;
-                    OnGotFocusInternal (EventArgs.Empty);
+                                       if (this.Parent != null && 
this.Parent.ContainerSelected)
+                                               return;
+                                       this.has_focus = true;
+                                       OnGotFocusInternal (EventArgs.Empty);
                                }
                                return;
                        }

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs  
2007-01-11 01:00:05 UTC (rev 70826)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs  
2007-01-11 02:00:12 UTC (rev 70827)
@@ -1932,6 +1932,9 @@
                                                if (is_loaded)
                                                        SelectActiveControl ();
 
+                                               if (ActiveControl != null && 
!ActiveControl.Focused)
+                                                       SendControlFocus 
(ActiveControl);
+
                                                OnActivated(EventArgs.Empty);
                                        } else {
                                                OnDeactivate(EventArgs.Empty);

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/UpDownBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/UpDownBase.cs    
2007-01-11 01:00:05 UTC (rev 70826)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/UpDownBase.cs    
2007-01-11 02:00:12 UTC (rev 70827)
@@ -40,7 +40,7 @@
        [ComVisible (true)]
 #endif
        [Designer("System.Windows.Forms.Design.UpDownBaseDesigner, " + 
Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
-       public abstract class UpDownBase : 
System.Windows.Forms.ContainerControl {
+       public abstract class UpDownBase : ContainerControl {
                #region UpDownSpinner Sub-class
                internal sealed class UpDownSpinner : Control {
                        #region Local Variables
@@ -295,8 +295,6 @@
                        Controls.Add (txtView);
                        ResumeLayout ();
 
-                       this.ActiveControl = txtView;
-
                        Height = PreferredHeight;
                        base.BackColor = txtView.BackColor;
 

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

Reply via email to