From 80c39c38bb8ffa0b3ee0dba317fec0c32a32c556 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 24 Aug 2002 02:59:27 +0000 Subject: [PATCH] (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. --- lisp/frame.el | 22 +++++++++++----------- 1 file 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 -- 2.11.4.GIT