]> git.eshelyaron.com Git - emacs.git/commit
* lisp/help.el (help--read-key-sequence): Handle `switch-frame' events
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 10 May 2019 12:49:03 +0000 (08:49 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 10 May 2019 12:51:39 +0000 (08:51 -0400)
commit655634808ad3b324ab844c53006e648b45713364
tree3b009d61839bf3b0a86db1c0f3110fc7f47dcdcf
parente8709e790006c75e1c91dbf0d50d5dbc816329f6
* lisp/help.el (help--read-key-sequence): Handle `switch-frame' events

If you do `C-h k ... mouse-1 in other frame` (at least if you have a focus
that follows the mouse), then additionally to the down-mouse-1 and mouse-1
events, a `switch-frame` event (and `select-window` event as well sometimes)
is generated.  When `read-key-sequence` is called with nil for
`can-return-switch-frame`, this event is not returned but kept for later,
which causes a subsequent `sit-for` to return nil immediately.
This interfered without our "wait for double-click" which in turn prevented
us from stopping after the mouse-1 click, getting stuck waiting for something
else instead.

(help--read-key-sequence): Pass a non-nil `can-return-switch-frame`, so the
subsequent `sit-for` returns more trustworthy information.
lisp/help.el