Author: jpobst
Date: 2007-09-27 16:20:25 -0400 (Thu, 27 Sep 2007)
New Revision: 86534

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
Log:
2007-09-27  Jonathan Pobst  <[EMAIL PROTECTED]>

        * Control.cs: Comment out a double buffering optimization that doesn't
        take into account invalidates created in OnPaint, causing the control
        to never be redrawn.  It would take quite a bit of work to work around
        this, but I left it commented with an explanation for later possible
        optimization.
        [Fixes bug #328681]

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-09-27 19:53:50 UTC (rev 86533)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-09-27 20:20:25 UTC (rev 86534)
@@ -1,5 +1,14 @@
 2007-09-27  Jonathan Pobst  <[EMAIL PROTECTED]>
 
+       * Control.cs: Comment out a double buffering optimization that doesn't
+       take into account invalidates created in OnPaint, causing the control
+       to never be redrawn.  It would take quite a bit of work to work around
+       this, but I left it commented with an explanation for later possible
+       optimization.
+       [Fixes bug #328681]
+
+2007-09-27  Jonathan Pobst  <[EMAIL PROTECTED]>
+
        * Control.cs: Ask parent to perform a layout if control is AutoSize and
        the text changes.
        * RadioButton.cs: Implement GetPreferredSizeCore.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2007-09-27 19:53:50 UTC (rev 86533)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2007-09-27 20:20:25 UTC (rev 86534)
@@ -5194,12 +5194,17 @@
                        DoubleBuffer current_buffer = null;
                        if (UseDoubleBuffering) {
                                current_buffer = GetBackBuffer ();
-                               if (!current_buffer.InvalidRegion.IsVisible 
(paint_event.ClipRectangle)) {
-                                       // Just blit the previous image
-                                       current_buffer.Blit (paint_event);
-                                       XplatUI.PaintEventEnd (ref m, handle, 
true);
-                                       return;
-                               }
+                               // This optimization doesn't work when the area 
is invalidated
+                               // during a paint operation because finishing 
the paint operation
+                               // clears the invalidated region and then this 
thing keeps the new
+                               // invalidate from working.  To re-enable this, 
we would need a
+                               // mechanism to allow for nested invalidates 
(see bug #328681)
+                               //if (!current_buffer.InvalidRegion.IsVisible 
(paint_event.ClipRectangle)) {
+                               //        // Just blit the previous image
+                               //        current_buffer.Blit (paint_event);
+                               //        XplatUI.PaintEventEnd (ref m, handle, 
true);
+                               //        return;
+                               //}
                                current_buffer.Start (paint_event);
                        }
                                

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

Reply via email to