;;; -*- Mode: Common-Lisp; Package: User; Base: 10.; Patch-File: T -*-

;;; Reason: Changes to expose-initial-screens for (mmon-p) disk-saves
;;; to jump-start (:method tv:standard-screen :around :expose)

;;;                           RESTRICTED RIGHTS LEGEND
;;;
;;; Use, duplication, or disclosure by the Government is subject to
;;; restrictions as set forth in subdivision (c)(1)(ii) of the Rights in
;;; Technical Data and Computer Software clause at 52.227-7013.
;;;
;;;   TEXAS INSTRUMENTS INCORPORATED      
;;;   P.O. BOX 2909, M/S 2151             
;;;   AUSTIN, TEXAS 78769                 
;;;
;;; Copyright (C) 1989 Texas Instruments Incorporated.
;;; All rights reserved.

;;; Written 11/10/89 17:12:08 by marky,
;;; while running on LIBRA from band LODB
;;; With SYSTEM 6.23, VIRTUAL-MEMORY 6.2, EH 6.5, MAKE-SYSTEM 6.2, MICRONET 6.0, LOCAL-FILE 6.1,
;;;  BASIC-PATHNAME 6.2, NETWORK-SUPPORT-COLD 6.2, BASIC-NAMESPACE 6.6, NETWORK-NAMESPACE 6.0,
;;;  DISK-IO 6.1, DISK-LABEL 6.0, BASIC-FILE 6.6, MAC-PATHNAME 6.0, NETWORK-PATHNAME 6.0,
;;;  COMPILER 6.14, TV 6.18, DATALINK 6.0, CHAOSNET 6.4, GC 6.3, MEMORY-AUX 6.0, NVRAM 6.2,
;;;  SYSLOG 6.2, STREAMER-TAPE 6.4, UCL 6.0, INPUT-EDITOR 6.0, METER 6.1, ZWEI 6.8,
;;;  DEBUG-TOOLS 6.3, NETWORK-SUPPORT 6.0, NETWORK-SERVICE 6.2, DATALINK-DISPLAYS 6.0,
;;;  FONT-EDITOR 6.1, SERIAL 6.0, PRINTER 6.3, MAC-PRINTER-TYPES 6.1, PRINTER-TYPES 6.2,
;;;  IMAGEN 6.1, SUGGESTIONS 6.1, MAIL-DAEMON 6.3, MAIL-READER 6.5, TELNET 6.0, VT100 6.0,
;;;  NAMESPACE-EDITOR 6.4, PROFILE 6.2, VISIDOC 6.5, TI-CLOS 6.26, CLEH 6.5, IP 3.56,
;;;  Experimental CLX 6.7, CLUE 6.32, X11M 6.16, Experimental BUG 11.16, MMON 6.2,
;;;   microcode 429, Band Name: REL6-mmon-11/10/89

#!C
; From file SHWARM.LISP#> WINDOW; Hotel:
#10R TV#:
(COMPILER-LET ((*PACKAGE* (FIND-PACKAGE "TV"))
                          (SI:*LISP-MODE* :COMMON-LISP)
                          (*READTABLE* COMMON-LISP-READTABLE)
                          (SI:*READER-SYMBOL-SUBSTITUTIONS* SYS::*COMMON-LISP-SYMBOL-SUBSTITUTIONS*))
  (COMPILER#:PATCH-SOURCE-FILE "SYS: WINDOW; SHWARM.#"


;; Fix to prevent tv:who-line-screen from staying deexposed when
;; booting a mmon-p disk-saved band that re-compiled si:disk-save-caller.
;; Currently, si:disk-save-caller (in the rel6 band) has *autoexpose-screens*
;; optimized out since it wasn't defined when the kernal was compiled by the
;; BUILD. When it is compiled correctly, (tv:standard-screen :around :expose)
;; does NOT expose the tv:who-line-screen unless it is nil when the *INITIAL-SCREEN*
;; is exposed during BOOT.
(DEFUN expose-initial-screens ()
  "Determines which screens should be exposed on available display hardware, and exposes them."
;  (unless (mmon-p)	;; may 11/10/89 
    ;; Screen expose method also exposes the associated who-line and makes it the "active" who-line
    ;; Since we're NILing out WHO-LINE-SCREEN, *INITIAL-SCREEN* exposure won't be able to deexpose it,
    ;; so we have to do it here.
    (WHEN (SEND who-line-screen :exposed-p)
      (SEND who-line-screen :deexpose))
    
    ;; NIL it out to force initialization in (standard-screen :around :expose).
    (SETF who-line-screen nil)
    
    ;; Prevent deexposure of DEFAULT-SCREEN when it hasn't been exposed yet...
    (WHEN (AND default-screen (NOT (SEND default-screen :exposed-p)))
      (SETF default-screen NIL))
    ;)	;; may 11/10/89 
  ;; ALWAYS do this
  (SEND *initial-screen* :expose))
))


#!C
; From file TVDEFS.LISP#> WINDOW; Hotel:
#10R TV#:
(COMPILER-LET ((*PACKAGE* (FIND-PACKAGE "TV"))
                          (SI:*LISP-MODE* :COMMON-LISP)
                          (*READTABLE* COMMON-LISP-READTABLE)
                          (SI:*READER-SYMBOL-SUBSTITUTIONS* SYS::*COMMON-LISP-SYMBOL-SUBSTITUTIONS*))
  (COMPILER#:PATCH-SOURCE-FILE "SYS: WINDOW; TVDEFS.#"

;; This was moved to tvdefs but since MMON is loadable it does not define
;; it and a new src build is required define it in tvdefs.
(unless (variable-boundp *screen-bits-action-at-who-line-deexposure* )
  ;; may 06/14/89 Moved from sys:mmon;new-methods-from-old-flavors
  (DEFPARAMETER *screen-bits-action-at-who-line-deexposure* :noop
    "Determines whether or not the image of the previous who-line-screen
should be erased when a different who-line-screen is exposed.  Possible
values are :NOOP to leave the image on the monitor, and :CLEAN to erase
the image."))

))
