summaryrefslogtreecommitdiff
path: root/lisp/frame.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-08-24 02:59:27 +0000
committerRichard M. Stallman <rms@gnu.org>2002-08-24 02:59:27 +0000
commit80c39c38bb8ffa0b3ee0dba317fec0c32a32c556 (patch)
tree26d11e4b378ae47382f912c4f36befe41151452f /lisp/frame.el
parenta2c4ae01567bac62988eab57b4043eff21255819 (diff)
downloademacs-80c39c38bb8ffa0b3ee0dba317fec0c32a32c556.tar.gz
(select-frame-by-name, select-frame-set-input-focus):
Always call x-focus-frame, if using x. Use set-mouse-position on all systems, if focus-follows-mouse.
Diffstat (limited to 'lisp/frame.el')
-rw-r--r--lisp/frame.el22
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index 1c7ab99cb6d..6969c14b855 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -654,14 +654,12 @@ automatically."
(select-frame frame)
(raise-frame frame)
;; Ensure, if possible, that frame gets input focus.
- (when (eq window-system 'w32)
- (w32-focus-frame frame))
+ (cond ((eq window-system 'x)
+ (x-focus-frame frame))
+ ((eq window-system 'w32)
+ (w32-focus-frame frame)))
(cond (focus-follows-mouse
- (unless (eq window-system 'w32)
- (set-mouse-position (selected-frame) (1- (frame-width)) 0)))
- (t
- (when (eq window-system 'x)
- (x-focus-frame frame)))))
+ (set-mouse-position (selected-frame) (1- (frame-width)) 0))))
(defun other-frame (arg)
"Select the ARG'th different visible frame on current display, and raise it.
@@ -721,10 +719,12 @@ If there is no frame by that name, signal an error."
(raise-frame frame)
(select-frame frame)
;; Ensure, if possible, that frame gets input focus.
- (if (eq window-system 'w32)
- (w32-focus-frame frame)
- (when focus-follows-mouse
- (set-mouse-position (selected-frame) (1- (frame-width)) 0)))))
+ (cond ((eq window-system 'x)
+ (x-focus-frame frame))
+ ((eq window-system 'w32)
+ (w32-focus-frame frame)))
+ (when focus-follows-mouse
+ (set-mouse-position frame (1- (frame-width frame)) 0))))
;;;; Frame configurations