Fix bug: new screens didn't update correctly under Linux (and probably
authorChris Hanson <org/chris-hanson/cph>
Wed, 6 Mar 1996 07:04:10 +0000 (07:04 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 6 Mar 1996 07:04:10 +0000 (07:04 +0000)
other unixes), because their first update occurred before the first
Expose event arrived, and that first update caused the NEEDS-UPDATE?
flag to be cleared.  The fix is to clear NEEDS-UPDATE? only when
SCREEN-UPDATE is run.

v7/src/edwin/screen.scm

index 7df2c71e4e736af17c15e9d35a28af8b4c5614e3..3fe491a1e88e019b93c1e24b7875e1ba9d283f6b 100644 (file)
@@ -1,8 +1,8 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: screen.scm,v 1.106 1995/07/02 06:38:33 cph Exp $
+;;;    $Id: screen.scm,v 1.107 1996/03/06 07:04:10 cph Exp $
 ;;;
-;;;    Copyright (c) 1989-95 Massachusetts Institute of Technology
+;;;    Copyright (c) 1989-96 Massachusetts Institute of Technology
 ;;;
 ;;;    This material was developed by the Scheme project at the
 ;;;    Massachusetts Institute of Technology, Department of
 (define (update-screen! screen display-style)
   (if (and display-style (not (eq? 'NO-OUTPUT display-style)))
       (screen-force-update screen))
-  (and (with-screen-in-update screen display-style
-        (lambda ()
-          (editor-frame-update-display! (screen-root-window screen)
-                                        display-style)))
-       (begin
-        (set-screen-needs-update?! screen false)
-        true)))
+  (let ((finished?
+        (with-screen-in-update screen display-style
+          (lambda ()
+            (editor-frame-update-display! (screen-root-window screen)
+                                          display-style)))))
+    (if (eq? finished? #t)
+       (set-screen-needs-update?! screen #f))
+    finished?))
 \f
 ;;; Interface from update optimizer to terminal:
 
               screen
               (lambda ()
                 (and (thunk)
-                     (or (not (screen-visible? screen))
+                     (if (screen-visible? screen)
                          (and (or (not (screen-needs-update? screen))
                                   (and (not (eq? 'NO-OUTPUT display-style))
                                        (screen-update screen display-style)))
                               (begin
                                 (screen-update-cursor screen)
-                                true))))))))
+                                #t))
+                         'INVISIBLE))))))
         (set-screen-in-update?! screen old-flag)
         finished?)))))