Add code to avoid writing the title-bar string except when it changes.
authorChris Hanson <org/chris-hanson/cph>
Fri, 3 May 1996 06:56:46 +0000 (06:56 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 3 May 1996 06:56:46 +0000 (06:56 +0000)
Otherwise it flickers annoyingly in common circumstances.

v7/src/edwin/os2term.scm

index 2cf6c24e0e8d591bd3a5e3126f55cd3ce061d04d..8acfa6e657a7292e627f53339ac0ff5830ef6d42 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: os2term.scm,v 1.13 1996/04/24 04:34:24 cph Exp $
+;;;    $Id: os2term.scm,v 1.14 1996/05/03 06:56:46 cph Exp $
 ;;;
 ;;;    Copyright (c) 1994-96 Massachusetts Institute of Technology
 ;;;
@@ -97,7 +97,7 @@
        (os2win-close-event-qid event-descriptor)
        (set! event-descriptor #f)
        unspecific)))
-
+\f
 (define (with-editor-interrupts-from-os2 receiver)
   (fluid-let ((reading-event? #f)
              (signal-interrupts? #t)
   (os2win-set-pos (screen-wid screen) x y))
 
 (define (os2-screen/set-title! screen title)
-  (os2win-set-title (screen-wid screen) title))
+  (let ((title* (screen-current-title screen)))
+    (if (not (and title* (string=? title title*)))
+       (begin
+         (set-screen-current-title! screen #f)
+         (os2win-set-title (screen-wid screen) title)
+         (set-screen-current-title! screen title)))))
 
 (define (os2-screen/raise! screen)
   (os2win-set-state (screen-wid screen) window-state:top))
   (pel-height 0)
   (char-map "")
   (face-map '#())
-  (current-face normal-face))
+  (current-face normal-face)
+  (current-title #f))
 
 (define-integrable (screen-wid screen)
   (screen-state/wid (screen-state screen)))
 (define-integrable (set-screen-current-face! screen face)
   (set-screen-state/current-face! (screen-state screen) face))
 
+(define-integrable (screen-current-title screen)
+  (screen-state/current-title (screen-state screen)))
+
+(define-integrable (set-screen-current-title! screen title)
+  (set-screen-state/current-title! (screen-state screen) title))
+\f
 (define-integrable (screen-psid screen)
   (os2win-ps (screen-wid screen)))