Eliminate OTHER-SCREEN?, replacing occurrences with OTHER-SCREEN.
Change meaning of SCREEN-VISIBLE? to mean "not unmapped"; this is
almost always what was meant.
Fix bug in SELECT-WINDOW: when selecting the selected window of
another frame, must select the frame.
Fix SELECT-BUFFER-OTHER-SCREEN to select the frame as well as the
buffer if reusing an existing frame.
;;; -*-Scheme-*-
;;;
-;;; $Id: curren.scm,v 1.141 2000/10/30 19:53:23 cph Exp $
+;;; $Id: curren.scm,v 1.142 2000/12/01 06:06:54 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology
;;;
(if other
(begin
(if (selected-screen? screen)
- (select-screen (or (other-screen screen 1 #f) other)))
+ (select-screen (or (other-screen screen) other)))
(screen-discard! screen)
(set-editor-screens! current-editor
(delq! screen
(else
screen)))
-(define (other-screen screen n invisible-ok?)
- (let ((next-screen (if (> n 0) screen1+ screen-1+)))
- (let loop ((screen* screen) (n (abs n)))
- (if (= n 0)
- screen*
- (let ((screen* (next-screen screen*)))
- (and (not (eq? screen* screen))
- (loop screen*
- (if (or invisible-ok? (screen-visible? screen*))
- (- n 1)
- n))))))))
-
-(define (other-screen? screen)
- (other-screen screen 1 #t))
+(define (other-screen screen #!optional n invisible-ok?)
+ (let ((n (if (default-object? n) 1 n))
+ (invisible-ok? (if (default-object? invisible-ok?) #f invisible-ok?)))
+ (let ((next-screen (if (> n 0) screen1+ screen-1+)))
+ (let loop ((screen* screen) (n (abs n)))
+ (if (= n 0)
+ screen*
+ (let ((screen* (next-screen screen*)))
+ (and (not (eq? screen* screen))
+ (loop screen*
+ (if (or invisible-ok? (screen-visible? screen))
+ (- n 1)
+ n)))))))))
\f
;;;; Windows
(lambda ()
(let* ((screen (window-screen window))
(window* (screen-selected-window screen)))
- (if (not (eq? window window*))
+ (if (eq? window window*)
+ (if (not (selected-screen? screen))
+ (select-screen screen))
(begin
(undo-leave-window! window*)
(if (selected-screen? screen)
;;; -*-Scheme-*-
;;;
-;;; $Id: debug.scm,v 1.53 2000/10/30 15:43:28 cph Exp $
+;;; $Id: debug.scm,v 1.54 2000/12/01 06:07:13 cph Exp $
;;;
;;; Copyright (c) 1992-2000 Massachusetts Institute of Technology
;;;
;; screen is the current screen, delete it too.
(let ((new-screen (browser/new-screen browser)))
(if (and (eq? new-screen screen)
- (other-screen? screen))
+ (other-screen screen 1 #t))
(delete-screen! screen))))
;; Kill the buffer, then maybe select another browser.
(let ((browser (get-buffer-browser buffer 'ASSOCIATED-WITH-BROWSER)))
#| -*-Scheme-*-
-$Id: edwin.pkg,v 1.264 2000/10/26 02:28:10 cph Exp $
+$Id: edwin.pkg,v 1.265 2000/12/01 06:07:21 cph Exp $
Copyright (c) 1989-2000 Massachusetts Institute of Technology
os/interprogram-cut
os/interprogram-paste
x-root-window-size
- x-screen-auto-raise
x-screen-ignore-focus-button?
x-selection-timeout
xterm-screen/flush!
(files "xcom")
(parent (edwin))
(export (edwin)
- edwin-command$auto-raise-mode
edwin-command$lower-frame
edwin-command$raise-frame
edwin-command$set-background-color
edwin-command$set-mouse-shape
edwin-command$show-frame-position
edwin-command$show-frame-size
- edwin-command$x-auto-raise-mode
edwin-command$x-lower-screen
edwin-command$x-mouse-ignore
edwin-command$x-mouse-keep-one-window
;;; -*-Scheme-*-
;;;
-;;; $Id: os2term.scm,v 1.21 1999/01/02 06:11:34 cph Exp $
+;;; $Id: os2term.scm,v 1.22 2000/12/01 06:07:26 cph Exp $
;;;
-;;; Copyright (c) 1994-1999 Massachusetts Institute of Technology
+;;; Copyright (c) 1994-2000 Massachusetts Institute of Technology
;;;
;;; This program is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU General Public License as
(begin
(set-screen-visibility! screen 'UNMAPPED)
(and (selected-screen? screen)
- (let ((screen (other-screen screen 1 #f)))
+ (let ((screen (other-screen screen)))
(and screen
(make-input-event 'SELECT-SCREEN
select-screen
;;; -*-Scheme-*-
;;;
-;;; $Id: scrcom.scm,v 1.7 2000/12/01 05:24:42 cph Exp $
+;;; $Id: scrcom.scm,v 1.8 2000/12/01 06:07:30 cph Exp $
;;;
;;; Copyright (c) 1990-2000 Massachusetts Institute of Technology
;;;
A negative ARG moves in the opposite order."
"p"
(lambda (arg)
- (let ((screen (other-screen (selected-screen) arg #f)))
+ (let ((screen (other-screen (selected-screen) arg)))
(if (not screen)
(editor-error "No other visible frame."))
(select-screen screen))))
;;; -*-Scheme-*-
;;;
-;;; $Id: screen.scm,v 1.117 1999/05/08 19:22:54 cph Exp $
+;;; $Id: screen.scm,v 1.118 2000/12/01 06:07:35 cph Exp $
;;;
-;;; Copyright (c) 1989-1999 Massachusetts Institute of Technology
+;;; Copyright (c) 1989-2000 Massachusetts Institute of Technology
;;;
;;; This program is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU General Public License as
(operation/write-substring! false read-only true)
(preemption-modulus false read-only true)
(root-window false)
+ ;; Visibility is one of the following:
+ ;; VISIBLE PARTIALLY-OBSCURED OBSCURED UNMAPPED DELETED
(visibility 'VISIBLE)
(needs-update? false)
(in-update? false)
'DESELECT-SCREEN))
(define (screen-discard! screen)
- (if (not (eq? (screen-visibility screen) 'DELETED))
+ (if (not (screen-deleted? screen))
(begin
(set-screen-visibility! screen 'DELETED)
(for-each (lambda (window) (send window ':kill!))
(editor-frame-screen (window-root-window window)))
(define (screen-visible? screen)
- (or (eq? 'VISIBLE (screen-visibility screen))
- (eq? 'PARTIALLY-OBSCURED (screen-visibility screen))))
+ (not (or (screen-deleted? screen)
+ (eq? 'UNMAPPED (screen-visibility screen)))))
(define-integrable (screen-deleted? screen)
(eq? 'DELETED (screen-visibility screen)))
screen
(lambda ()
(and (thunk)
- (if (screen-visible? screen)
+ (if (memq (screen-visibility screen)
+ '(VISIBLE PARTIALLY-OBSCURED))
(and (or (not (screen-needs-update? screen))
(and (not (display-style/no-screen-output?
display-style))
;;; -*-Scheme-*-
;;;
-;;; $Id: win32.scm,v 1.13 2000/05/01 03:01:39 cph Exp $
+;;; $Id: win32.scm,v 1.14 2000/12/01 06:07:39 cph Exp $
;;;
;;; Copyright (c) 1994-2000 Massachusetts Institute of Technology
;;;
(screen-force-update screen)
(make-input-event 'UPDATE update-screen! screen #f))
(and (selected-screen? screen)
- (let ((screen (other-screen screen 1 #f)))
+ (let ((screen (other-screen screen)))
(and screen
(make-input-event 'SELECT-SCREEN
select-screen
;;; -*-Scheme-*-
;;;
-;;; $Id: wincom.scm,v 1.130 2000/10/27 04:01:16 cph Exp $
+;;; $Id: wincom.scm,v 1.131 2000/12/01 06:07:43 cph Exp $
;;;
;;; Copyright (c) 1987, 1989-2000 Massachusetts Institute of Technology
;;;
(let ((window (selected-window)))
(if (and (window-has-no-neighbors? window)
(use-multiple-screens?)
- (other-screen? (selected-screen)))
+ (other-screen (selected-screen) 1 #t))
(delete-screen! (selected-screen))
(window-delete! window)))))
(let ((window (other-window n)))
(if (selected-window? window)
(and (use-multiple-screens?)
- (let ((screen (other-screen (selected-screen) 1 #f)))
+ (let ((screen (other-screen (selected-screen))))
(and screen
(screen-selected-window screen))))
window))))
(let ((screen
(other-screen (if (or (default-object? screen) (not screen))
(selected-screen)
- screen)
- 1 #t)))
+ screen))))
(if screen
- (select-buffer buffer (screen-selected-window screen))
+ (let ((window (screen-selected-window screen)))
+ (select-window window)
+ (select-buffer buffer window))
(make-screen buffer)))
(editor-error "Display doesn't support multiple screens")))
(set-variable! split-height-threshold limit))
(maybe-deselect-buffer-layout screen)
(cond ((and (use-multiple-screens?)
- (other-screen screen 1 #t))
+ (other-screen screen))
=> (lambda (screen)
(pop-into-window (screen-selected-window screen))))
((ref-variable preserve-window-arrangement)