Author: andreia
Date: 2007-12-09 14:21:23 -0500 (Sun, 09 Dec 2007)
New Revision: 91009
Modified:
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
Log:
[Backport to 1.2.6]
* Control.cs: check if windows are actually mapped before
trying to zorder. Fixes #342509, #346955
2007-12-09 Andreia Gaita <[EMAIL PROTECTED]>
Modified:
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
---
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-12-09 19:07:22 UTC (rev 91008)
+++
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-12-09 19:21:23 UTC (rev 91009)
@@ -1,3 +1,8 @@
+2007-12-09 Andreia Gaita <[EMAIL PROTECTED]>
+ [Backport to 1.2.6]
+ * Control.cs: check if windows are actually mapped before
+ trying to zorder. Fixes #342509, #346955
+
2007-12-05 Andreia Gaita <[EMAIL PROTECTED]>
[Backport to 1.2.6]
* Control.cs: When updating the zorder, ignore windows that are not
Modified:
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
---
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2007-12-09 19:07:22 UTC (rev 91008)
+++
branches/mono-1-2-6/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2007-12-09 19:21:23 UTC (rev 91009)
@@ -4889,14 +4889,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