diff options
author | Peter Dennis Bartok <pbartok@mono-cvs.ximian.com> | 2006-02-03 11:34:50 +0300 |
---|---|---|
committer | Peter Dennis Bartok <pbartok@mono-cvs.ximian.com> | 2006-02-03 11:34:50 +0300 |
commit | db4017ba607477ae52ca5452cc17bc9e37ec9a5e (patch) | |
tree | 4930d17c0e3b989bfd6a9065e1399d2c538533d3 /mcs/class/Managed.Windows.Forms | |
parent | c9bb7c1bc1ea3623ea9131e1186d05bcaf2c2a85 (diff) |
2006-02-03 Peter Dennis Bartok <pbartok@novell.com>
* Control.cs (RecreateHandle): No need to re-create any child
controls, the child windows will get destroyed automatically by
the windowing system or driver, and re-created when the handle
is being accessed the first time. Fixes #77456
* Form.cs: No longer setting the form to closing if the handle is
being recreated. This seems like the right thing to do, don't
have a bug or testcase for this, though.
svn path=/trunk/mcs/; revision=56510
Diffstat (limited to 'mcs/class/Managed.Windows.Forms')
3 files changed, 13 insertions, 7 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index beaf3ef074d..255ee5f4607 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,13 @@ +2006-02-03 Peter Dennis Bartok <pbartok@novell.com> + + * Control.cs (RecreateHandle): No need to re-create any child + controls, the child windows will get destroyed automatically by + the windowing system or driver, and re-created when the handle + is being accessed the first time. Fixes #77456 + * Form.cs: No longer setting the form to closing if the handle is + being recreated. This seems like the right thing to do, don't + have a bug or testcase for this, though. + 2006-02-02 Peter Dennis Bartok <pbartok@novell.com> * FileDialog.cs: Suspend/Resume layouting when changing sizes of diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs index 0098d01d825..d2f2cf254f4 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs @@ -3253,12 +3253,6 @@ namespace System.Windows.Forms if (IsHandleCreated) { DestroyHandle(); CreateHandle(); - - // FIXME ZOrder? - - while (child.MoveNext()) { - ((Control)child.Current).RecreateHandle(); - } } else { if (!is_created) { CreateControl(); 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 f273483f7d7..1a1dbdb693e 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs @@ -1541,7 +1541,9 @@ namespace System.Windows.Forms { switch((Msg)m.Msg) { case Msg.WM_DESTROY: { base.WndProc(ref m); - this.closing = true; + if (!is_recreating) { + this.closing = true; + } return; } |