From d92edc881f5fb82be39e978774d89c62a336d37f Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 29 Jan 1998 06:05:44 +0000 Subject: [PATCH] Implement procedure to return the size of the display root window. --- v7/src/edwin/edwin.pkg | 3 ++- v7/src/edwin/xterm.scm | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/v7/src/edwin/edwin.pkg b/v7/src/edwin/edwin.pkg index 50f29dc91..389a0eb76 100644 --- a/v7/src/edwin/edwin.pkg +++ b/v7/src/edwin/edwin.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: edwin.pkg,v 1.218 1998/01/03 05:03:18 cph Exp $ +$Id: edwin.pkg,v 1.219 1998/01/29 06:05:35 cph Exp $ Copyright (c) 1989-98 Massachusetts Institute of Technology @@ -1016,6 +1016,7 @@ MIT in each case. |# (export (edwin) os/interprogram-cut os/interprogram-paste + x-root-window-size x-screen-auto-raise x-screen-ignore-focus-button? x-selection-timeout diff --git a/v7/src/edwin/xterm.scm b/v7/src/edwin/xterm.scm index 20765231f..83121eb3f 100644 --- a/v7/src/edwin/xterm.scm +++ b/v7/src/edwin/xterm.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: xterm.scm,v 1.54 1996/10/24 16:29:46 cph Exp $ +;;; $Id: xterm.scm,v 1.55 1998/01/29 06:05:44 cph Exp $ ;;; ;;; Copyright (c) 1989-96 Massachusetts Institute of Technology ;;; @@ -57,6 +57,7 @@ (x-display-descriptor 1) (x-display-flush 1) (x-display-get-default 3) + (x-display-get-size 2) (x-display-process-events 2) (x-display-sync 2) (x-get-atom-name 2) @@ -210,6 +211,10 @@ (if sign (string-head geometry sign) geometry))) + +(define (x-root-window-size) + (x-display-get-size (or (get-x-display) (error "Unable to open display.")) + 0)) ;;; According to the Xlib manual, we're not allowed to draw anything ;;; on the window until the first Expose event arrives. The manual -- 2.25.1