Author: rolf
Date: 2007-05-04 06:15:01 -0400 (Fri, 04 May 2007)
New Revision: 76663

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiClient.cs
Log:
* Form.cs: Add OnDeactivateInternal.
* MdiClient.cs: Raise Deactivate event. Fixes #81409.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-05-04 09:28:34 UTC (rev 76662)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-05-04 10:15:01 UTC (rev 76663)
@@ -1,5 +1,10 @@
 2007-05-04  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
 
+       * Form.cs: Add OnDeactivateInternal.
+       * MdiClient.cs: Raise Deactivate event. Fixes #81409.
+
+2007-05-04  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
+
        * DateTimePicker.cs: CalculateDropDownLocation: do a null check before
          accessing the parent. Fixes #81508.
 

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs  
2007-05-04 09:28:34 UTC (rev 76662)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs  
2007-05-04 10:15:01 UTC (rev 76663)
@@ -149,6 +149,11 @@
                {
                        OnActivated (EventArgs.Empty);
                }
+               
+               internal void OnDeactivateInternal ()
+               {
+                       OnDeactivate (EventArgs.Empty);
+               }
 
                internal override void UpdateWindowText ()
                {

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiClient.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiClient.cs     
2007-05-04 09:28:34 UTC (rev 76662)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiClient.cs     
2007-05-04 10:15:01 UTC (rev 76663)
@@ -657,6 +657,7 @@
                                return;
                        
                        Form current = (Form) Controls [0];
+                       bool raise_deactivate = ParentForm.ActiveControl == 
current;
 
                        // We want to resize the new active form before it is 
                        // made active to avoid flickering. Can't do it in the
@@ -666,6 +667,7 @@
                        // happen before the form is made active (and in many 
cases
                        // before it is visible, which avoids flickering as 
well).
                        MdiWindowManager wm = 
(MdiWindowManager)form.WindowManager;
+                       
                        if (current.WindowState == FormWindowState.Maximized && 
form.WindowState != FormWindowState.Maximized && form.Visible) {
                                FormWindowState old_state = form.window_state;
                                SetWindowState (form, old_state, 
FormWindowState.Maximized, true);
@@ -682,6 +684,8 @@
                                        XplatUI.InvalidateNC (current.Handle);
                                if (form.IsHandleCreated)
                                        XplatUI.InvalidateNC (form.Handle);
+                               if (raise_deactivate)
+                                       current.OnDeactivateInternal ();
                        }
                        active_child = (Form) Controls [0];
                        

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to