diff --git a/scheme/xlib/window.scm b/scheme/xlib/window.scm index bb9bac0..76c2668 100644 --- a/scheme/xlib/window.scm +++ b/scheme/xlib/window.scm @@ -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