+ added window-exists? predicate.
This commit is contained in:
parent
d4ea951ebf
commit
0edcaacf88
|
@ -49,6 +49,16 @@
|
||||||
'copy-from-parent 'copy-from-parent 'copy-from-parent
|
'copy-from-parent 'copy-from-parent 'copy-from-parent
|
||||||
set-window-attribute-alist))
|
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 **************************************
|
||||||
|
|
||||||
;; change-window-attributes takes an alist of set-window-attributes
|
;; change-window-attributes takes an alist of set-window-attributes
|
||||||
|
@ -317,11 +327,6 @@
|
||||||
(let ((t (query-tree window)))
|
(let ((t (query-tree window)))
|
||||||
(and t (caddr t))))
|
(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
|
;; translate-coordinates takes the x and y coordinates relative to the
|
||||||
;; source window's origin and returns a list of three elements: the x
|
;; source window's origin and returns a list of three elements: the x
|
||||||
;; and y coordinates relative to the destination window's origin. If
|
;; and y coordinates relative to the destination window's origin. If
|
||||||
|
|
Loading…
Reference in New Issue