Author: andreia
Date: 2007-12-09 14:07:22 -0500 (Sun, 09 Dec 2007)
New Revision: 91008
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
Log:
* Control.cs: check if windows are actually mapped before
trying to zorder. Fixes #342509, #346955
2007-12-09 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
2007-12-09 17:43:59 UTC (rev 91007)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-12-09 19:07:22 UTC (rev 91008)
@@ -1,3 +1,8 @@
+2007-12-09 Andreia Gaita <[EMAIL PROTECTED]>
+
+ * Control.cs: check if windows are actually mapped before
+ trying to zorder. Fixes #342509, #346955
+
2007-12-07 Carlos Alberto Cortez <[EMAIL PROTECTED]>
* ListView.cs:
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2007-12-09 17:43:59 UTC (rev 91007)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2007-12-09 19:07:22 UTC (rev 91008)
@@ -4904,14 +4904,14 @@
}
private void UpdateZOrderOfChild(Control child) {
- if (IsHandleCreated && child.IsHandleCreated &&
(child.parent == this)) {
+ if (IsHandleCreated && child.IsHandleCreated &&
(child.parent == this) && Hwnd.ObjectFromHandle(child.Handle).Mapped) {
// Need to take into account all controls
Control [] all_controls =
child_controls.GetAllControls ();
int index = Array.IndexOf (all_controls, child);
for (; index > 0; index--) {
- if (!all_controls [index -
1].IsHandleCreated || !all_controls [index - 1].VisibleInternal)
+ if (!all_controls [index -
1].IsHandleCreated || !all_controls [index - 1].VisibleInternal ||
!Hwnd.ObjectFromHandle(all_controls [index - 1].Handle).Mapped)
continue;
break;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches