Author: toshok
Date: 2006-10-31 16:24:11 -0500 (Tue, 31 Oct 2006)
New Revision: 67192

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
        * Control.cs (set_Capture): make a logic a little easier to
        follow.

        * XplatUIX11.cs (CleanupCachedWindows): zero out the Grab window
        if it's being destroyed.  A necessary fix surely, but a bandaid
        also, to fix the stuck capture problem in bug #78413.

2006-10-31  Chris Toshok  <[EMAIL PROTECTED]>



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-10-31 21:11:49 UTC (rev 67191)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-10-31 21:24:11 UTC (rev 67192)
@@ -1,5 +1,14 @@
 2006-10-31  Chris Toshok  <[EMAIL PROTECTED]>
 
+       * Control.cs (set_Capture): make a logic a little easier to
+       follow.
+
+       * XplatUIX11.cs (CleanupCachedWindows): zero out the Grab window
+       if it's being destroyed.  A necessary fix surely, but a bandaid
+       also, to fix the stuck capture problem in bug #78413.
+
+2006-10-31  Chris Toshok  <[EMAIL PROTECTED]>
+
        * XplatUIX11.cs: fix a couple of compiler warnings, and follow the
        convention of clearing hwnd.ClientRect when we set the
        width/height (so it'll be recalculated by Hwnd).

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2006-10-31 21:11:49 UTC (rev 67191)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2006-10-31 21:24:11 UTC (rev 67192)
@@ -1720,11 +1720,11 @@
                        }
 
                        set {
-                               if (this.IsHandleCreated) {
-                                       if (value && !is_captured) {
+                               if (this.IsHandleCreated && value != 
is_captured) {
+                                       if (value) {
                                                is_captured = true;
                                                
XplatUI.GrabWindow(this.window.Handle, IntPtr.Zero);
-                                       } else if (!value && is_captured) {
+                                       } else {
                                                
XplatUI.UngrabWindow(this.window.Handle);
                                                is_captured = false;
                                        }

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2006-10-31 21:11:49 UTC (rev 67191)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2006-10-31 21:24:11 UTC (rev 67192)
@@ -1640,6 +1640,11 @@
                                FocusWindow = IntPtr.Zero;
                        }
 
+                       if (Grab.Hwnd == hwnd.Handle) {
+                               Grab.Hwnd = IntPtr.Zero;
+                               Grab.Confined = false;
+                       }
+
                        DestroyCaret (hwnd.Handle);
                }
 

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

Reply via email to