Author: jpobst
Date: 2007-08-08 10:49:16 -0400 (Wed, 08 Aug 2007)
New Revision: 83673

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/XplatUIWin32.cs
Log:
2007-08-08  Jonathan Pobst  <[EMAIL PROTECTED]>

        * Control.cs: Allow the clip region to be set back to null.
        * XplatUIWin32.cs: If we are sent a null clip region, use IntPtr.Zero.
        [Fixes button still showing up in bug #82370 when Show Through is 
turned off]

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-08-08 14:43:39 UTC (rev 83672)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-08-08 14:49:16 UTC (rev 83673)
@@ -1,3 +1,9 @@
+2007-08-08  Jonathan Pobst  <[EMAIL PROTECTED]>
+
+       * Control.cs: Allow the clip region to be set back to null.
+       * XplatUIWin32.cs: If we are sent a null clip region, use IntPtr.Zero.
+       [Fixes button still showing up in bug #82370 when Show Through is 
turned off]
+
 2007-08-08  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
 
        * GridEntry.cs: Add a null check.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2007-08-08 14:43:39 UTC (rev 83672)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2007-08-08 14:49:16 UTC (rev 83673)
@@ -3008,7 +3008,7 @@
 
                        set {
                                if (clip_region != value) {
-                                       if (value != null && IsHandleCreated)
+                                       if (IsHandleCreated)
                                                XplatUI.SetClipRegion(Handle, 
value);
 
                                        clip_region = value;

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs  
2007-08-08 14:43:39 UTC (rev 83672)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs  
2007-08-08 14:49:16 UTC (rev 83673)
@@ -2374,7 +2374,10 @@
                }
 
                internal override void SetClipRegion(IntPtr hwnd, Region 
region) {
-                       Win32SetWindowRgn(hwnd, 
region.GetHrgn(Graphics.FromHwnd(hwnd)), true);
+                       if (region == null)
+                               Win32SetWindowRgn (hwnd, IntPtr.Zero, true);
+                       else
+                               Win32SetWindowRgn(hwnd, 
region.GetHrgn(Graphics.FromHwnd(hwnd)), true);
                }
 
                internal override void EnableWindow(IntPtr handle, bool Enable) 
{

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

Reply via email to