Add switch to control "auto-raise" feature of X graphics windows.
authorChris Hanson <org/chris-hanson/cph>
Thu, 26 Mar 1992 00:01:27 +0000 (00:01 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 26 Mar 1992 00:01:27 +0000 (00:01 +0000)
v7/src/runtime/runtime.pkg
v7/src/runtime/x11graph.scm
v8/src/runtime/runtime.pkg

index e34834f5957ccf399559ea12f3763ea4d85f4df6..9d9bb97560a15cc114ea1324ab1ab250bcc79758 100644 (file)
@@ -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
index a873c3aebbdda5f54e89af05814c9aa3f95ae7ac..6356a2673803e4740d68786fff9ec367d009150a 100644 (file)
@@ -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. |#
 \f
 ;;;; 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)
index dc1a009e50fc6314e3f739e65a49b0cef7438b8b..e5c3db2c1384aa3136e36c7520df60a3dc708309 100644 (file)
@@ -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