Author: jackson
Date: 2006-06-16 18:14:53 -0400 (Fri, 16 Jun 2006)
New Revision: 61816
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiClient.cs
Log:
- Eliminate separate tracking of the active control, we can just
get this from the controls collection.
- Paint the decorations for the newly activated titlebar so we
get
a pretty blue bar.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-06-16 21:44:45 UTC (rev 61815)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-06-16 22:14:53 UTC (rev 61816)
@@ -3,6 +3,10 @@
* MdiClient.cs: Instead of just sizing maximized windows when
there is a resize we also have to adjust the Y of minimized
windows, so they stay pinned to the bottom of the mdi container.
+ - Eliminate separate tracking of the active control, we can just
+ get this from the controls collection.
+ - Paint the decorations for the newly activated titlebar so we get
+ a pretty blue bar.
* InternalWindowManager.cs:
* ThemeWin32Classic.cs: Minimized windows get all three buttons
even if they are a tool window.
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiClient.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiClient.cs
2006-06-16 21:44:45 UTC (rev 61815)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiClient.cs
2006-06-16 22:14:53 UTC (rev 61816)
@@ -36,7 +36,6 @@
public sealed class MdiClient : Control {
#region Local Variables
private int mdi_created;
- private Form active;
private HScrollBar hbar;
private VScrollBar vbar;
private SizeGrip sizegrip;
@@ -483,10 +482,11 @@
Form current = (Form) Controls [0];
form.BringToFront ();
- active = form;
- if (current != form)
+ if (current != form) {
current.WindowManager.PaintDecorations ();
+ form.WindowManager.PaintDecorations ();
+ }
}
internal int ChildrenCreated {
@@ -495,8 +495,15 @@
}
internal Form ActiveMdiChild {
- get { return active; }
- set { active = value; }
+ get {
+ if (Controls.Count < 1)
+ return null;
+ return (Form) Controls [0];
+ }
+ set {
+ ActivateChild (value);
+ }
}
}
}
+
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches