[mcclim-cvs] CVS mcclim/Drei

thenriksen thenriksen at common-lisp.net
Mon Jan 28 08:25:39 UTC 2008


Update of /project/mcclim/cvsroot/mcclim/Drei
In directory clnet:/tmp/cvs-serv536/Drei

Modified Files:
	drei-redisplay.lisp 
Log Message:
Fixed redisplay bug where added lines might not be marked as dirty.


--- /project/mcclim/cvsroot/mcclim/Drei/drei-redisplay.lisp	2008/01/27 10:46:53	1.51
+++ /project/mcclim/cvsroot/mcclim/Drei/drei-redisplay.lisp	2008/01/28 08:25:34	1.52
@@ -700,10 +700,21 @@
                           (return (values pump-state line-height))))))))
 
 (defun clear-stale-lines (pane view)
-  "Clear from the last displayed line to the end of `pane'."
+  "Clear from the last displayed line to the end of `pane' and
+mark undisplayed line objects as dirty."
   (let ((line-dimensions (line-dimensions (last-displayed-line view))))
     (clear-rectangle* pane (x1 line-dimensions) (y2 line-dimensions)
-                      (bounding-rectangle-width pane) (bounding-rectangle-height pane))))
+                      (bounding-rectangle-width pane) (bounding-rectangle-height pane)))
+  ;; This way, strokes of lines that have at one point been left
+  ;; undisplayed will always be considered modified when they are
+  ;; filled again. The return is for optimisation, we know that an
+  ;; unused stroke can only be followed by other unused strokes.
+  (do-undisplayed-lines (line view)
+    (setf (line-stroke-count line) 0)
+    (do-undisplayed-line-strokes (stroke line)
+      (if (null (stroke-start-offset stroke))
+          (return)
+          (setf (stroke-start-offset stroke) nil)))))
 
 (defvar *maximum-chunk-size* 100
   "The maximum amount of objects put into a stroke by a




More information about the Mcclim-cvs mailing list