changeset 47016:876e9026e464

(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.
author Richard M. Stallman <rms@gnu.org>
date Sat, 24 Aug 2002 02:59:27 +0000
parents 7faae7c35e07
children 0ba62d75345e
files lisp/frame.el
diffstat 1 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/frame.el	Sat Aug 24 02:58:53 2002 +0000
+++ b/lisp/frame.el	Sat Aug 24 02:59:27 2002 +0000
@@ -654,14 +654,12 @@
     (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 @@
     (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