From: Juri Linkov Date: Sat, 15 Jan 2022 18:37:15 +0000 (+0200) Subject: * lisp/mouse.el (context-menu-map): Select clicked window (bug#53249). X-Git-Tag: emacs-29.0.90~3024 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=791694c5fe86b8c9ab5cb593bd5e050aa185aa3a;p=emacs.git * lisp/mouse.el (context-menu-map): Select clicked window (bug#53249). --- diff --git a/lisp/mouse.el b/lisp/mouse.el index 82424e3e244..502683d3d1e 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -324,6 +324,8 @@ the function `context-menu-filter-function'." (fun (mouse-posn-property (event-start click) 'context-menu-function))) + (select-window (posn-window (event-start click))) + (if (functionp fun) (setq menu (funcall fun menu click)) (run-hook-wrapped 'context-menu-functions