# HG changeset patch # User Gerd Moellmann # Date 962615463 0 # Node ID 275ab94028be2ea301ce2808dc7389ead264e6e9 # Parent d6a745cf3bfcea165dac647615392f0f22495ec7 (sup-pos-to-window): Use some-window instead of cycling through windows with next-window. diff -r d6a745cf3bfc -r 275ab94028be lisp/term/sup-mouse.el --- a/lisp/term/sup-mouse.el Mon Jul 03 09:10:44 2000 +0000 +++ b/lisp/term/sup-mouse.el Mon Jul 03 09:11:03 2000 +0000 @@ -191,18 +191,6 @@ (defun sup-pos-to-window (x y) "Find window corresponding to frame coordinates. X and Y are 0-based character positions on the frame." - (let ((edges (window-edges)) - (window nil)) - (while (and (not (eq window (selected-window))) - (or (< y (nth 1 edges)) - (>= y (nth 3 edges)) - (< x (nth 0 edges)) - (>= x (nth 2 edges)))) - (setq window (next-window window)) - (setq edges (window-edges window)) - ) - (or window (selected-window)) - ) - ) + (some-window (lambda (w) (coordinates-in-window-p (cons x y) w)))) ;;; sup-mouse.el ends here