Author: paullanders
Date: Wed Aug 26 00:18:57 2015
New Revision: 38931

URL: http://svn.gna.org/viewcvs/gnustep?rev=38931&view=rev
Log:
Potential fixes for remote view flickering issue.

Modified:
    libs/gui/branches/gnustep_testplant_branch/Source/NSView.m

Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSView.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSView.m?rev=38931&r1=38930&r2=38931&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSView.m  (original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSView.m  Wed Aug 26 
00:18:57 2015
@@ -2545,6 +2545,7 @@
       flush = YES;
       [_window disableFlushWindow];
       aRect = NSIntersectionRect(aRect, visibleRect);
+      aRect = NSIntegralRect(aRect);
       neededRect = NSIntersectionRect(_invalidRect, visibleRect);
   
       /*
@@ -2554,7 +2555,7 @@
        * If the drawn rectangle cuts off a complete part of the
        * _invalidRect, we should remove that part.
        */
-      if (NSEqualRects(aRect, NSUnionRect(neededRect, aRect)) == YES)
+      if (NSEqualRects(aRect, NSUnionRect(neededRect, aRect)) == YES || 
neededRect.size.width < 1 || neededRect.size.height < 1)
         {
           _invalidRect = NSZeroRect;
           _rFlags.needs_display = NO;
@@ -2563,7 +2564,7 @@
       else
          {
                  NSRectEdge sliceEdge = NSNotFound;
-                 int distance = 0;
+                 float distance = 0;
 
                  // check that intersection of aRect and _invalidRect either 
has an equal height or width to _invalidRect
                  // eg, if they are equal heights, we might be a slice on the 
left or right side
@@ -2588,7 +2589,7 @@
                  }
 
                  // remove the drawn area from _invalidRect
-                 if ( sliceEdge != NSNotFound ) {
+                 if ( sliceEdge != NSNotFound && fabsf(distance) >= 1 ) {
                          NSRect newInvalid;
                          NSDivideRect(_invalidRect, 0, &newInvalid, distance, 
sliceEdge);
                          _invalidRect = newInvalid;


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to