From 057d3da581e3c0965a0646c060863be586bbbbc5 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 26 Mar 1992 00:01:27 +0000 Subject: [PATCH] Add switch to control "auto-raise" feature of X graphics windows. --- v7/src/runtime/runtime.pkg | 3 ++- v7/src/runtime/x11graph.scm | 14 +++++++++++++- v8/src/runtime/runtime.pkg | 3 ++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index e34834f59..9d9bb9756 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.140 1992/03/25 23:51:57 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.141 1992/03/26 00:01:27 cph Exp $ Copyright (c) 1988-92 Massachusetts Institute of Technology @@ -2109,6 +2109,7 @@ MIT in each case. |# x-graphics/set-window-name x-graphics/starbase-filename x-graphics/withdraw-window + x-graphics:auto-raise? x-image/destroy x-image/draw x-image/draw-subimage diff --git a/v7/src/runtime/x11graph.scm b/v7/src/runtime/x11graph.scm index a873c3aeb..6356a2673 100644 --- a/v7/src/runtime/x11graph.scm +++ b/v7/src/runtime/x11graph.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/x11graph.scm,v 1.16 1992/03/20 05:18:02 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/x11graph.scm,v 1.17 1992/03/26 00:01:18 cph Exp $ Copyright (c) 1989-92 Massachusetts Institute of Technology @@ -375,6 +375,8 @@ MIT in each case. |# ;;;; Standard Operations +(define x-graphics:auto-raise? false) + (define-structure (x-window (conc-name x-window/) (constructor make-x-window (xw display))) xw @@ -388,6 +390,12 @@ MIT in each case. |# (define-integrable (x-graphics-device/xd device) (x-display/xd (x-window/display (graphics-device/descriptor device)))) +(define-integrable (x-graphics-device/mapped? device) + (x-window/mapped? (graphics-device/descriptor device))) + +(define-integrable (x-graphics-device/visibility device) + (x-window/visibility (graphics-device/descriptor device))) + (define (x-graphics/open display geometry #!optional suppress-map?) (let ((display (if (x-display? display) @@ -456,6 +464,10 @@ MIT in each case. |# (x-graphics-draw-string (x-graphics-device/xw device) x y string)) (define (x-graphics/flush device) + (if (and x-graphics:auto-raise? + (x-graphics-device/mapped? device) + (not (eq? 'UNOBSCURED (x-graphics-device/visibility device)))) + (x-graphics/raise-window device)) (x-display-flush (x-graphics-device/xd device))) (define (x-graphics/move-cursor device x y) diff --git a/v8/src/runtime/runtime.pkg b/v8/src/runtime/runtime.pkg index dc1a009e5..e5c3db2c1 100644 --- a/v8/src/runtime/runtime.pkg +++ b/v8/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.140 1992/03/25 23:51:57 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.141 1992/03/26 00:01:27 cph Exp $ Copyright (c) 1988-92 Massachusetts Institute of Technology @@ -2109,6 +2109,7 @@ MIT in each case. |# x-graphics/set-window-name x-graphics/starbase-filename x-graphics/withdraw-window + x-graphics:auto-raise? x-image/destroy x-image/draw x-image/draw-subimage -- 2.25.1