Fix expose events that arrive before a fix-layout's drawing.
authorMatt Birkholz <matt@birkholz.chandler.az.us>
Thu, 8 Mar 2012 18:26:46 +0000 (11:26 -0700)
committerMatt Birkholz <matt@birkholz.chandler.az.us>
Thu, 8 Mar 2012 18:26:46 +0000 (11:26 -0700)
src/gtk/fix-layout.scm

index 44d0530707c36e012662c8081a1254487ca13f52..05810e6ebff18e2e6cd1cd29cd661f0470487d80 100644 (file)
@@ -469,12 +469,16 @@ USA.
        (view (fix-layout-view layout)))
     (let ((offx (fix-rect-x view))
          (offy (fix-rect-y view)))
-      (%trace2 ";expose area "width"x"height" "x","y
-              " of "layout".\n")
-      (drawing-expose drawing layout window
-                     (make-fix-rect
-                      (fix:+ x offx) (fix:+ y offy)
-                      width height)))))
+      (if drawing
+         (begin
+           (%trace2 ";expose area "width"x"height" "x","y
+                    " of "layout".\n")
+           (drawing-expose drawing layout window
+                           (make-fix-rect
+                            (fix:+ x offx) (fix:+ y offy)
+                            width height)))
+         (%trace2 ";";expose area "width"x"height" "x","y
+                    " of "layout" (no drawing!).\n")))))
 
 (define-method set-gtk-widget-bg-color! ((widget <fix-layout>) color
                                         #!optional state)