From 277564b4ac40c26a668f25d108fd994f08a1dd97 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Thu, 11 Jan 2007 02:21:16 +0000 Subject: [PATCH] * Form.cs: move the call to SendControlFocus into the same is_loaded check. 2007-01-10 Chris Toshok svn path=/trunk/mcs/; revision=70828 --- mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog | 5 +++++ mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index 8ec1787b54a..c70b0580b1a 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,5 +1,10 @@ 2007-01-10 Chris Toshok + * Form.cs: move the call to SendControlFocus into the same + is_loaded check. + +2007-01-10 Chris Toshok + * UpDownBase.cs (.ctor): remove the ActiveControl assignment here. It breaks in the face of the new ActiveControl stuff, and should be unnecessary. diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs index 37d719e23ce..cb19377a7c9 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs @@ -1929,11 +1929,12 @@ namespace System.Windows.Forms { case Msg.WM_ACTIVATE: { if (m.WParam != (IntPtr)WindowActiveFlags.WA_INACTIVE) { - if (is_loaded) + if (is_loaded) { SelectActiveControl (); - if (ActiveControl != null && !ActiveControl.Focused) - SendControlFocus (ActiveControl); + if (ActiveControl != null && !ActiveControl.Focused) + SendControlFocus (ActiveControl); + } OnActivated(EventArgs.Empty); } else { -- 2.11.4.GIT