From: Chris Hanson Date: Wed, 2 Sep 1992 03:18:45 +0000 (+0000) Subject: Add procedure to restore focus to the editor's screen. X-Git-Tag: 20090517-FFI~9011 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=87e7c0060336bc111ac63a1978ca2d188664085d;p=mit-scheme.git Add procedure to restore focus to the editor's screen. --- diff --git a/v7/src/6001/edextra.scm b/v7/src/6001/edextra.scm index 75408e507..f7c645bb6 100644 --- a/v7/src/6001/edextra.scm +++ b/v7/src/6001/edextra.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/6001/edextra.scm,v 1.4 1992/09/02 02:56:36 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/6001/edextra.scm,v 1.5 1992/09/02 03:17:58 cph Exp $ Copyright (c) 1992 Massachusetts Institute of Technology @@ -41,20 +41,30 @@ MIT in each case. |# (define-command print-graphics "Print out the last displayed picture." '() - (let ((call-with-last-picture-file - (environment-lookup (->environment '(student pictures)) - 'call-with-last-picture-file))) - (lambda () - (call-with-last-picture-file - (lambda (filename) - (if filename - (begin - (message "Spooling...") - (shell-command - false false false false - (string-append "/users/u6001/bin/print-pgm.sh " - filename - " " - (print/assemble-switches "Scheme Picture" '()))) - (append-message "done")) - (editor-error "No picture to print!"))))))) \ No newline at end of file + (lambda () + (call-with-last-picture-file + (lambda (filename) + (if filename + (begin + (message "Spooling...") + (shell-command + false false false false + (string-append "/users/u6001/bin/print-pgm.sh " + filename + " " + (print/assemble-switches "Scheme Picture" '()))) + (append-message "done")) + (editor-error "No picture to print!")))))) + +(environment-link-name '(edwin) + '(student pictures) + 'call-with-last-picture-file) + +(define (restore-focus-to-editor) + (let ((screen (selected-screen))) + (if (xterm-screen/grab-focus! screen) + (xterm-screen/flush! screen)))) + +(environment-link-name '(student pictures) + '(edwin) + 'restore-focus-to-editor) \ No newline at end of file diff --git a/v7/src/6001/picture.scm b/v7/src/6001/picture.scm index 6bd7a6d54..9ff10e49b 100644 --- a/v7/src/6001/picture.scm +++ b/v7/src/6001/picture.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/6001/picture.scm,v 1.16 1992/09/01 22:41:37 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/6001/picture.scm,v 1.17 1992/09/02 03:18:45 cph Exp $ Copyright (c) 1991-92 Massachusetts Institute of Technology @@ -90,6 +90,7 @@ MIT in each case. |# (x-graphics/flush window) (if (not (n-gray-map window)) (allocate-grays window)) + (restore-focus-to-editor) window)) (define (n-gray-map window)