+ added window-exists? predicate.

This commit is contained in:
frese 2002-04-02 11:39:10 +00:00
parent d4ea951ebf
commit 0edcaacf88
1 changed files with 10 additions and 5 deletions

View File

@ -49,6 +49,16 @@
'copy-from-parent 'copy-from-parent 'copy-from-parent
set-window-attribute-alist))
;; window-exists? returns #t if the windows still exists (makes sense,
;; doesn't it :-)
(define (window-exists? window)
(and (integer? (window-Xwindow window)) ;; hasn't been destroyed by
;; destroy-window
(if (query-tree window) ;; query-tree returns #f if
#t #f))) ;; the window does not
;; exists.
;; *** change-window-attributes **************************************
;; change-window-attributes takes an alist of set-window-attributes
@ -317,11 +327,6 @@
(let ((t (query-tree window)))
(and t (caddr t))))
(define (window-exists? window) ;; maybe this should be done a little
;; bit more clever
(if (query-tree window)
#t #f))
;; translate-coordinates takes the x and y coordinates relative to the
;; source window's origin and returns a list of three elements: the x
;; and y coordinates relative to the destination window's origin. If