2007-01-10 Chris Toshok <toshok@ximian.com>
commita1d40c4b8a89acf0dd2ad0415f4c7baa45c22130
authorChris Toshok <toshok@novell.com>
Wed, 10 Jan 2007 19:28:52 +0000 (10 19:28 -0000)
committerChris Toshok <toshok@novell.com>
Wed, 10 Jan 2007 19:28:52 +0000 (10 19:28 -0000)
tree58d22041af05a43aad641bb85bca4e5065101ba9
parentd01b964d4dca675b70c788b9342bef890ccc45a8
2007-01-10  Chris Toshok  <toshok@ximian.com>

* ContainerControl.cs (set_ActiveControl): rework this a bit (and
add some nice ascii art pictures and explanation of the process).
(GetMostDeeplyNestedActiveControl): new utility function we need
because our ActiveControl can refer to a child container with its
own ActiveControl.

* Form.cs (OnActivated): remove the call to SelectActiveControl
from here, since you can override this method and not chain up,
and winforms still sets the active control.
(OnCreateControl): also remove the unnecessary SelectActiveControl
call from here.
(WndProc): it's actually called from the WM_ACTIVATE block, just
before calling OnActivated.

* Control.cs (Select (Control)): move the call to XplatUI.SetFocus
inside the else.  the ActiveControl setter will end up setting
focus on @control.  This keeps us from setting it again (and
generating an extra LostFocus/GotFocus pair).
(Select (bool, bool)): reindent.

svn path=/trunk/mcs/; revision=70804
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs