2008-06-27 Ivan N. Zlatev <contact@i-nz.net>
authorIvan Zlatev <ivan@ivanz.com>
Fri, 27 Jun 2008 01:51:12 +0000 (01:51 -0000)
committerIvan Zlatev <ivan@ivanz.com>
Fri, 27 Jun 2008 01:51:12 +0000 (01:51 -0000)
* Control.cs: Visibility of the control should be false
when the handle is destroyed in WmDestroy and not immediately
in Dispose(). This is effectively where the disposing process
ends even though the control is marked as Disposed immediately
after calling Dispose().
[Fixes bug #402446]

svn path=/trunk/mcs/; revision=106721

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs

index cc491502b92c9ef15560e32b0b4c53bc7c83ac4c..b5879a18f055c54687d72b13e4ca2a12066b5ee6 100644 (file)
@@ -1,3 +1,10 @@
+2008-06-27  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * Control.cs: Visibility of the control should be false 
+       when the handle is destroyed in WmDestroy and not immediately 
+       in Dispose().
+       [Fixes bug #402446]
+
 2008-06-27  Ivan N. Zlatev  <contact@i-nz.net>
 
        * PropertyGridTextBox.cs: Start monitoring the mouse clicks 
index 2f83edeb680690ff487cc85bef76bfc231b16bc0..5ca80165f3197f76983f6a8329cded7a9486941a 100644 (file)
@@ -1148,8 +1148,6 @@ namespace System.Windows.Forms
                                }
                        }
                        is_disposed = true;
-                       is_disposing = false;
-                       is_visible = false;
                        base.Dispose(disposing);
                }
                #endregion      // Public Constructors
@@ -5454,6 +5452,11 @@ namespace System.Windows.Forms
 #endif
                                is_recreating = false;
                        }
+
+                       if (is_disposing) {
+                               is_disposing = false;
+                               is_visible = false;
+                       }
                }
 
                private void WmWindowPosChanged (ref Message m) {