fixed a bug for situtations when there's no window focused

This commit is contained in:
frese 2003-03-30 01:41:37 +00:00
parent 278134b1c7
commit 2f654441c4
1 changed files with 5 additions and 1 deletions

View File

@ -86,7 +86,11 @@
;; unregister-key ??
(define (do-grabs dpy grabs event)
(let* ((path (reverse (window-path dpy (get-input-focus-window dpy))))
(let* ((fwin (get-input-focus-window dpy)) ;; can be pointer-root and none
(path (reverse (if (or (equal? fwin none)
(equal? fwin pointer-root))
'()
(window-path dpy fwin))))
(grabs (flatten
(filter
(lambda (x) x)