Author: ivanz
Date: 2008-01-25 20:34:18 -0500 (Fri, 25 Jan 2008)
New Revision: 93970

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGridView.cs
Log:
2008-01-26  Ivan N. Zlatev  <[EMAIL PROTECTED]>

         * PropertyGridView.cs: Close dropdown form if the owner form is
         moved or minimized.
         [Fixes bug #322446]



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2008-01-26 01:12:25 UTC (rev 93969)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2008-01-26 01:34:18 UTC (rev 93970)
@@ -1,3 +1,9 @@
+2008-01-26  Ivan N. Zlatev  <[EMAIL PROTECTED]>
+
+        * PropertyGridView.cs: Close dropdown form if the owner form is
+        moved or minimized.
+        [Fixes bug #322446]
+
 2008-01-25  Ivan N. Zlatev  <[EMAIL PROTECTED]>
 
         * PropertyGrid.cs, PropertyGridView.cs, GridEntry.cs, GridItem.cs, 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGridView.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGridView.cs  
    2008-01-26 01:12:25 UTC (rev 93969)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGridView.cs  
    2008-01-26 01:34:18 UTC (rev 93970)
@@ -862,15 +862,22 @@
                                System.Windows.Forms.MSG msg = new MSG ();
                                queue_id = XplatUI.StartLoop 
(Thread.CurrentThread);
                                while (dropdown_form.Visible && 
XplatUI.GetMessage (queue_id, ref msg, IntPtr.Zero, 0, 0)) {
-
                                        if ((msg.message == 
Msg.WM_NCLBUTTONDOWN ||
                                             msg.message == 
Msg.WM_NCMBUTTONDOWN ||
                                             msg.message == 
Msg.WM_NCRBUTTONDOWN ||
                                             msg.message == Msg.WM_LBUTTONDOWN 
||
                                             msg.message == Msg.WM_MBUTTONDOWN 
||
-                                            msg.message == Msg.WM_RBUTTONDOWN)
+                                            msg.message == Msg.WM_RBUTTONDOWN 
||
+                                            msg.message == Msg.WM_ACTIVATE ||
+                                            HwndInControl (owner, msg.hwnd) && 
// owner form moved
+                                            msg.message == Msg.WM_NCPAINT)
                                            && !HwndInControl (dropdown_form, 
msg.hwnd)) {
+                                               if (msg.message == 
Msg.WM_NCPAINT) {
+                                                       Message m = 
Message.Create (msg.hwnd, (int)msg.message, msg.wParam, msg.lParam);
+                                                       XplatUI.DefWndProc (ref 
m);
+                                               }
                                                CloseDropDown ();
+                                               XplatUI.EndLoop 
(Thread.CurrentThread);
                                                break;
                                        }
                                        XplatUI.TranslateMessage (ref msg);

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

Reply via email to