summaryrefslogtreecommitdiff
path: root/lisp/ediff-util.el
diff options
context:
space:
mode:
authorMichael Kifer <kifer@cs.stonybrook.edu>1997-09-11 16:08:19 +0000
committerMichael Kifer <kifer@cs.stonybrook.edu>1997-09-11 16:08:19 +0000
commitbee44c5ac9d024567360f2b0d4bef06dbfac25a2 (patch)
tree976698536ca7d80e0a75ca9c9bfe74bda50abdf2 /lisp/ediff-util.el
parent23ef625b9ab757afc51303833b0eace97e175d75 (diff)
downloademacs-bee44c5ac9d024567360f2b0d4bef06dbfac25a2.tar.gz
new version
Diffstat (limited to 'lisp/ediff-util.el')
-rw-r--r--lisp/ediff-util.el23
1 files changed, 19 insertions, 4 deletions
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el
index 0d11f7b33cb..4d0dc828c7d 100644
--- a/lisp/ediff-util.el
+++ b/lisp/ediff-util.el
@@ -2355,10 +2355,7 @@ temporarily reverses the meaning of this variable."
;; 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 @@ temporarily reverses the meaning of this variable."
(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 ()