From 791694c5fe86b8c9ab5cb593bd5e050aa185aa3a Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sat, 15 Jan 2022 20:37:15 +0200 Subject: [PATCH] * lisp/mouse.el (context-menu-map): Select clicked window (bug#53249). --- lisp/mouse.el | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.39.2