Author: andreia
Date: 2006-10-31 22:15:32 -0500 (Tue, 31 Oct 2006)
New Revision: 67203

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
Log:
* ContainerControl.cs: reverted rev.67183 (which was itself
a reversion of rev.66853... eh).

* Control.cs: Fixes Reflector hang by changing Focus() call
to what it was before rev.66643 (calling Select() here sets 
ActiveControl, which in some situations calls back Focus and 
eventually does a stack overflow). Temp fix.    
Changes to GetNextControl() to not look for children to select when
parent cannot be selectable (so it looks for siblings instead)

2006-10-31      Andreia Gaita <[EMAIL PROTECTED]>

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-01 03:10:05 UTC (rev 67202)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-01 03:15:32 UTC (rev 67203)
@@ -1,3 +1,15 @@
+2006-10-31     Andreia Gaita <[EMAIL PROTECTED]>
+
+       * ContainerControl.cs: reverted rev.67183 (which was itself
+       a reversion of rev.66853... eh).
+       
+       * Control.cs: Fixes Reflector hang by changing Focus() call
+       to what it was before rev.66643 (calling Select() here sets 
+       ActiveControl, which in some situations calls back Focus and 
+       eventually does a stack overflow). Temp fix.    
+       Changes to GetNextControl() to not look for children to select when
+       parent cannot be selectable (so it looks for siblings instead)  
+       
 2006-10-31  Mike Kestner  <[EMAIL PROTECTED]>
 
        * CheckedListBox.cs : off by one error in returned index from

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs  
    2006-11-01 03:10:05 UTC (rev 67202)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs  
    2006-11-01 03:15:32 UTC (rev 67203)
@@ -68,7 +68,7 @@
                        }
 
                        set {
-                               if (value==null || (active_control == value && 
active_control.has_focus) /*|| !Contains(value)*/) {
+                               if (value==null || (active_control == value && 
active_control.has_focus) || !Contains(value)) {
                                        return;
                                }
 

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2006-11-01 03:10:05 UTC (rev 67202)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2006-11-01 03:15:32 UTC (rev 67203)
@@ -2783,7 +2783,7 @@
 
                public bool Focus() {
                        if (CanFocus && IsHandleCreated && !has_focus) {
-                               Select(this);
+                               XplatUI.SetFocus(this.window.Handle);
                        }
                        return has_focus;
                }
@@ -2814,8 +2814,10 @@
 
                public Control GetNextControl(Control ctl, bool forward) {
 
-                       if (this != ctl) {
-                               if ((parent == null) && (ctl is 
IContainerControl) && ctl.GetStyle(ControlStyles.ContainerControl)) {
+                       if (ctl != null && this != ctl) {
+                               if (!ctl.CanSelect || 
+                                       ((parent == null) && (ctl is 
IContainerControl) && ctl.GetStyle(ControlStyles.ContainerControl))
+                                  ) {
                                        if (forward) {
                                                return FindFlatForward(this, 
ctl);
                                        } else {

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

Reply via email to