summaryrefslogtreecommitdiff
path: root/lisp/frame.el
diff options
context:
space:
mode:
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