Subject: bug#26104: 26.0.50; In Ubuntu, having mouse over other frame cause Alt key to produce a <switch-frame> event

From: martin rudalics <[email-masked]>
Date: Sat, 18 Mar 2017 09:19:04 +0100

> That does fix the problem for yank-pop, but I don't think it's a good
 > fix. For example, it let's someone use yank-pop without having used
 > yank if they use handle-switch-frame before. Also, the same issue
 > happens with other commands like dabbrev-expand, which relies on
 > checking what the previous command was.

It wasn't meant to fix anything.  I just wanted to know whether
bypassing this error would allow ‘yank-pop’ to proceed without further
problems.

 > What is the purpose of executing `handle-switch-frame` at all? Maybe
 > there's some way of excluding it from last-command. But again, I don't
 > really understand x-windows well or why that command is being sent.

IIUC we don't "send" that command anywhere.  We rather put it in the
event queue to tell ourselves that we are now in a safe and
"historically accurate" place to run Lisp, select that frame's selected
window and run some associated hooks.  Maybe someone can tell us the
real purpose.

martin