changeset 29998:275ab94028be

(sup-pos-to-window): Use some-window instead of cycling through windows with next-window.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 03 Jul 2000 09:11:03 +0000
parents d6a745cf3bfc
children 2c3b912c56ed
files lisp/term/sup-mouse.el
diffstat 1 files changed, 1 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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