aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPip Cet2019-06-11 10:13:36 +0200
committerMartin Rudalics2019-06-11 10:13:36 +0200
commit70d5e0ce3896d12e70472a3f33312d4a60b3e607 (patch)
treebbd7fa35d9363b882ebab35207b740be8c19f992
parent0026d0bf9f4e4e0247de9c1eb885507608378266 (diff)
downloademacs-70d5e0ce3896d12e70472a3f33312d4a60b3e607.tar.gz
emacs-70d5e0ce3896d12e70472a3f33312d4a60b3e607.zip
Fix mouse cursor movement in 'select-frame-set-input-focus' (Bug#36165)
* lisp/frame.el (select-frame-set-input-focus): With 'mouse-autoselect-window' use 'set-mouse-pixel-position' to avoid selecting another window manager window (Bug#36165).
-rw-r--r--lisp/frame.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index a8c230cb7b2..7b61003c9ac 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -979,10 +979,11 @@ recently selected windows nor the buffer list."
979 ;; Move mouse cursor if necessary. 979 ;; Move mouse cursor if necessary.
980 (cond 980 (cond
981 (mouse-autoselect-window 981 (mouse-autoselect-window
982 (let ((edges (window-inside-edges (frame-selected-window frame)))) 982 (let ((edges (window-edges (frame-selected-window frame)
983 t nil t)))
983 ;; Move mouse cursor into FRAME's selected window to avoid that 984 ;; Move mouse cursor into FRAME's selected window to avoid that
984 ;; Emacs mouse-autoselects another window. 985 ;; Emacs mouse-autoselects another window.
985 (set-mouse-position frame (nth 2 edges) (nth 1 edges)))) 986 (set-mouse-pixel-position frame (1- (nth 2 edges)) (nth 1 edges))))
986 (focus-follows-mouse 987 (focus-follows-mouse
987 ;; Move mouse cursor into FRAME to avoid that another frame gets 988 ;; Move mouse cursor into FRAME to avoid that another frame gets
988 ;; selected by the window manager. 989 ;; selected by the window manager.