From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#26104: 26.0.50; In Ubuntu, having mouse over other frame cause Alt key to produce a event Date: Sat, 01 Apr 2017 11:53:47 +0200 Message-ID: <58DF78AB.9010603@gmx.at> References: <3517ed20-78a5-f7ea-7594-eeb18c95e90e@gmail.com> <58CB8E1C.7080104@gmx.at> <58CCED78.8050904@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1491040461 12746 195.159.176.226 (1 Apr 2017 09:54:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Apr 2017 09:54:21 +0000 (UTC) To: Jonathan Ganc , 26104@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 01 11:54:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuFjV-0001is-BO for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Apr 2017 11:54:09 +0200 Original-Received: from localhost ([::1]:50558 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuFjY-000605-6y for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Apr 2017 05:54:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuFjS-0005zz-IG for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2017 05:54:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuFjO-0005Qi-M1 for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2017 05:54:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56884) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cuFjO-0005Qa-I6 for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2017 05:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cuFjO-0007BE-74 for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2017 05:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Apr 2017 09:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26104 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26104-submit@debbugs.gnu.org id=B26104.149104044127593 (code B ref 26104); Sat, 01 Apr 2017 09:54:02 +0000 Original-Received: (at 26104) by debbugs.gnu.org; 1 Apr 2017 09:54:01 +0000 Original-Received: from localhost ([127.0.0.1]:55083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuFjN-0007Az-4y for submit@debbugs.gnu.org; Sat, 01 Apr 2017 05:54:01 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:62461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuFjL-0007Al-G1 for 26104@debbugs.gnu.org; Sat, 01 Apr 2017 05:54:00 -0400 Original-Received: from [192.168.1.100] ([213.162.68.37]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MIMyZ-1cq7vM2xbz-004FEF; Sat, 01 Apr 2017 11:53:51 +0200 In-Reply-To: <58CCED78.8050904@gmx.at> X-Provags-ID: V03:K0:qUWjvRYNIoO15ObMqYWntejUV6XbYqxhb+xm1Luu4NVjDxcpaez ot1HG9e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-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131163 Archived-At: > 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 selecte= d > window and run some associated hooks. Maybe someone can tell us the > real purpose. Maybe we should start with finding out how that switch-frame event gets generated. keyboard.c has this /* Try generating a mouse motion event. */ else if (!NILP (do_mouse_tracking) && some_mouse_moved ()) { ... if (! EQ (frame, internal_last_event_frame) && !EQ (frame, selected_frame)) obj =3D make_lispy_switch_frame (frame); internal_last_event_frame =3D frame; and from your description "and the mouse is positioned over the other frame" your problem is likely triggered there. If you set the variable =E2=80=98track-mouse=E2=80=99 to nil do you still= see the problem? Since this probably won't help when you are within the body of a =E2=80=98track-mouse=E2=80=99 form, you would have to trace invocations= of the latter too. If the event is triggered this way we seem to have a contradiction because the doc-string of =E2=80=98handle-switch-frame=E2=80=99 says A switch-frame event tells Emacs that the window manager has requested= that the user=E2=80=99s events be directed to the frame mentioned in t= he event. but in the above scenario the window manager is apparently not involved. In either case it will be debatable whether we should allow the mouse to do anything "significant" in between C-y and M-y. IIUC, the philosophy for M-y to succeed is that your fingers didn't move away from the keyboard after the previous C-y. Otherwise, we'd have to decide whether to allow mouse scrolling or window autoselection in between C-y and M-y as well. Here, with focus follows mouse, leaving a frame with the mouse without entering another one is already sufficient to make M-y fail. And if your window manager has a strict focus policy, the M-y won't even make it to your Emacs frame ;-) martin