Some more checks for false windows.

This commit is contained in:
mainzelm 2003-09-01 11:34:48 +00:00
parent eee88046ca
commit ebc29177c0
2 changed files with 10 additions and 6 deletions

View File

@ -444,7 +444,7 @@
(define (manager-parent root-wm manager) (define (manager-parent root-wm manager)
(let loop ((parent-window (window-parent (root-wm:dpy root-wm) (let loop ((parent-window (window-parent (root-wm:dpy root-wm)
(wm:window manager)))) (wm:window manager))))
(if (zero? parent-window) (if (or (not parent-window) (zero? parent-window))
#f #f
(let ((l (filter (lambda (m) (let ((l (filter (lambda (m)
(equal? (wm:window m) parent-window)) (equal? (wm:window m) parent-window))

View File

@ -48,7 +48,7 @@
(let ((res (fun (lambda () (sync-point-release sp))))) (let ((res (fun (lambda () (sync-point-release sp)))))
;;(mdisplay "thread " id " returned: " res "\n") ;;(mdisplay "thread " id " returned: " res "\n")
res) res)
)))) ))) id)
(sync-point-wait sp)))) (sync-point-wait sp))))
(define (with-lock lock thunk) (define (with-lock lock thunk)
@ -299,8 +299,11 @@
(map-state is-viewable))) (map-state is-viewable)))
(define (window-mapped? dpy window) (define (window-mapped? dpy window)
(not (eq? (window-attribute:map-state (get-window-attributes dpy window)) (and window
(map-state is-unmapped)))) (let ((attrs (get-window-attributes dpy window)))
(and attrs
(not (eq? (window-attribute:map-state attrs)
(map-state is-unmapped)))))))
(define (window-focused? dpy window) (define (window-focused? dpy window)
(eq? (get-input-focus-window dpy) window)) (eq? (get-input-focus-window dpy) window))
@ -594,8 +597,9 @@
(property:data p) (property:data p)
'()))))) '())))))
(map (lambda (win) (map (lambda (win)
(window-attribute:colormap (get-window-attributes dpy win))) (window-attribute:colormap
wins))) (get-window-attributes dpy win)))
(filter (lambda (x) x) wins))))
(define (install-colormaps dpy window) (define (install-colormaps dpy window)
(for-each (lambda (c) (for-each (lambda (c)