Author: jpobst
Date: 2006-11-16 11:29:04 -0500 (Thu, 16 Nov 2006)
New Revision: 68009
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
Log:
2006-11-16 Jonathan Pobst <[EMAIL PROTECTED]
[Fixes 79778, 79923]
* XplatUIWin32.cs: Don't allow a parent to be set to IntPtr.Zero.
Parent to the FosterParent instead.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-11-16 16:09:41 UTC (rev 68008)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-11-16 16:29:04 UTC (rev 68009)
@@ -1,3 +1,10 @@
+2006-11-16 Jonathan Pobst <[EMAIL PROTECTED]
+
+ [Fixes 79778, 79923]
+
+ * XplatUIWin32.cs: Don't allow a parent to be set to IntPtr.Zero.
+ Parent to the FosterParent instead.
+
2006-11-16 Jackson Harper <[EMAIL PROTECTED]>
* TreeView.cs: Need to recalc the topnode when we expand or
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
2006-11-16 16:09:41 UTC (rev 68008)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
2006-11-16 16:29:04 UTC (rev 68009)
@@ -1592,9 +1592,13 @@
else
SetVisible (handle, c.is_visible, true);
- return Win32SetParent(handle, parent);
+ if (parent == IntPtr.Zero)
+ return Win32SetParent (handle, FosterParent);
+ else
+ return Win32SetParent(handle, parent);
}
+ // If we ever start using this, we should probably replace
FosterParent with IntPtr.Zero
internal override IntPtr GetParent(IntPtr handle) {
return Win32GetParent(handle);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches