Mercurial > emacs
changeset 19870:a016beb4f4cf
new version
author | Michael Kifer <kifer@cs.stonybrook.edu> |
---|---|
date | Thu, 11 Sep 1997 16:08:19 +0000 |
parents | 3c4025f3be8f |
children | 847fbc8725a9 |
files | lisp/ediff-util.el |
diffstat | 1 files changed, 19 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ediff-util.el Thu Sep 11 11:52:38 1997 +0000 +++ b/lisp/ediff-util.el Thu Sep 11 16:08:19 1997 +0000 @@ -2355,10 +2355,7 @@ ;; warp mouse into a working window (setq warp-frame ; if mouse is over a reasonable frame, use it - (cond ((and ediff-xemacs-p (window-live-p (car (mouse-position)))) - (window-frame (car (mouse-position)))) - ((frame-live-p (car (mouse-position))) - (car (mouse-position))) + (cond ((ediff-good-frame-under-mouse)) (t warp-frame))) (if (frame-live-p warp-frame) (set-mouse-position (if ediff-emacs-p @@ -2369,6 +2366,24 @@ (if (ediff-buffer-live-p meta-buffer) (ediff-show-meta-buffer meta-buffer)) )) + +;; Returns frame under mouse, if this frame is not a minibuffer +;; frame. Otherwise: nil +(defun ediff-good-frame-under-mouse () + (let ((frame-or-win (car (mouse-position))) + (buf-name "") + frame obj-ok) + (setq obj-ok + (if ediff-emacs-p + (frame-live-p frame-or-win) + (window-live-p frame-or-win))) + (if obj-ok + (setq frame (if ediff-emacs-p frame-or-win (window-frame frame-or-win)) + buf-name + (buffer-name (window-buffer (frame-selected-window frame))))) + (if (string-match "Minibuf" buf-name) + nil + frame))) (defun ediff-delete-temp-files ()