comparison lisp/term/bg-mouse.el @ 39174:f05289e60329

(bg-window-from-x-y): Use get-window-with-predicate.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 07 Sep 2001 11:33:32 +0000
parents 253f761ad37b
children 62c9f562dc40
comparison
equal deleted inserted replaced
39173:afcda06e306e 39174:f05289e60329
1 ;;; bg-mouse.el --- GNU Emacs code for BBN Bitgraph mouse 1 ;;; bg-mouse.el --- GNU Emacs code for BBN Bitgraph mouse
2 2
3 ;; Copyright (C) Free Software Foundation, Inc. Oct 1985. 3 ;; Copyright (C) 2001 Free Software Foundation, Inc. Oct 1985.
4 4
5 ;; Author: John Robinson <jr@bbn-unix.arpa> 5 ;; Author: John Robinson <jr@bbn-unix.arpa>
6 ;; Stephen Gildea <gildea@bbn.com> 6 ;; Stephen Gildea <gildea@bbn.com>
7 ;; Maintainer: FSF 7 ;; Maintainer: FSF
8 ;; Keywords: hardware 8 ;; Keywords: hardware
253 ;;; Returns the window that screen position (x, y) is in or nil if none, 253 ;;; Returns the window that screen position (x, y) is in or nil if none,
254 ;;; meaning we are in the echo area with a non-active minibuffer. 254 ;;; meaning we are in the echo area with a non-active minibuffer.
255 (defun bg-window-from-x-y (x y) 255 (defun bg-window-from-x-y (x y)
256 "Find window corresponding to screen coordinates. 256 "Find window corresponding to screen coordinates.
257 X and Y are 0-based character positions on the screen." 257 X and Y are 0-based character positions on the screen."
258 (some-window (lambda (w) (coordinates-in-window-p (cons x y) w)))) 258 (get-window-with-predicate (lambda (w)
259 (coordinates-in-window-p (cons x y) w))))
259 260
260 (defun bg-command-execute (bg-command) 261 (defun bg-command-execute (bg-command)
261 (if (commandp bg-command) 262 (if (commandp bg-command)
262 (command-execute bg-command) 263 (command-execute bg-command)
263 (ding))) 264 (ding)))