From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jonathan Ganc 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: Mon, 3 Apr 2017 20:59:44 -0400 Message-ID: <1d493e40-8d0d-a393-081f-55e32bef0857@gmail.com> References: <3517ed20-78a5-f7ea-7594-eeb18c95e90e@gmail.com> <58CB8E1C.7080104@gmx.at> <58CCED78.8050904@gmx.at> <58DF78AB.9010603@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1491267618 27591 195.159.176.226 (4 Apr 2017 01:00:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 4 Apr 2017 01:00:18 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 To: martin rudalics , 26104@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 04 03:00:11 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 1cvCpL-00065S-R8 for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Apr 2017 03:00:08 +0200 Original-Received: from localhost ([::1]:33468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvCpR-000796-N2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Apr 2017 21:00:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvCpL-00077E-Vr for bug-gnu-emacs@gnu.org; Mon, 03 Apr 2017 21:00:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvCpI-0007pJ-TJ for bug-gnu-emacs@gnu.org; Mon, 03 Apr 2017 21:00:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33220) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cvCpI-0007pB-OU for bug-gnu-emacs@gnu.org; Mon, 03 Apr 2017 21:00:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cvCpI-00080U-Dp for bug-gnu-emacs@gnu.org; Mon, 03 Apr 2017 21:00:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jonathan Ganc Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Apr 2017 01:00:03 +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.149126759230729 (code B ref 26104); Tue, 04 Apr 2017 01:00:03 +0000 Original-Received: (at 26104) by debbugs.gnu.org; 4 Apr 2017 00:59:52 +0000 Original-Received: from localhost ([127.0.0.1]:59652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvCp6-0007zY-6r for submit@debbugs.gnu.org; Mon, 03 Apr 2017 20:59:52 -0400 Original-Received: from mail-qk0-f174.google.com ([209.85.220.174]:36748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvCp5-0007zM-DY for 26104@debbugs.gnu.org; Mon, 03 Apr 2017 20:59:51 -0400 Original-Received: by mail-qk0-f174.google.com with SMTP id p22so129588513qka.3 for <26104@debbugs.gnu.org>; Mon, 03 Apr 2017 17:59:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=x/sJ3l95il+r989GfrZIIkujh2pnHGyOplfEVcF5FwU=; b=SMLF17rPa1wM+7mM8yE0wR1RBBFyVxbnP3tHTTI+DBliXNxv6JVNkmsjc+KIcWmCBm W3VJNySJzqT9LPPskYc9FYscGpUKyCKYjPPCBwWt+/9zMYaYUvk4DmsF442zf8LOwXxE 1UAbktrRVG37bugPscNoDyB3ViHufb/vC7li7V5X3mCwB17eRksBlRcZReGHK/oPPRdJ So8hCxjV9yihSCRH8AA7hK++PVeBF38/gcoe34VXzDhNiTt21SWrwLacSczO+QuwkU6c UHAlA3alG/rxsVDMe7HVFbG+duNPL6La35T3xvdu+wsEYiSbU2fltgl+yKn4Fisu2luq 0yoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=x/sJ3l95il+r989GfrZIIkujh2pnHGyOplfEVcF5FwU=; b=HRUFjtXjfgeR+27JnmSQH+9qKgW73pRFYZ7ipvQ5fIi6/N0CSkpGWfSwP8abls9a69 wsm1mL1T7DDFOYly1/dp+zdl67ijvfkb+2qBXlF3xnvC7K8zIr0v/MPLGAk0sCrAoia7 hh27vOCGs/w79zKKnLP8MkMhMWWoMuX6EBDMKxxZngmMbqBQ3eCZGA/s3qpXrDGAQVIM i98u35u+y4TYf7371hXkU2MglkQTYRmJM4a2esOEWg3DB56idr6me2tXmCP88BrccGXk kZQ8u8jwDe5VwcAyS8kbjrAT6gJEp0uYmN8+3Q67sOK9d7e6OeIuvcQBQeORnNpkwSr5 MwsA== X-Gm-Message-State: AFeK/H1GvB3WDnNRih5p1FRILcoH+WFdJoQN843W30yM98+LB/TXAtZSVv/nFCiFitkHLg== X-Received: by 10.55.92.3 with SMTP id q3mr19643331qkb.164.1491267585841; Mon, 03 Apr 2017 17:59:45 -0700 (PDT) Original-Received: from [192.168.1.200] (static-98-118-34-152.bstnma.fios.verizon.net. [98.118.34.152]) by smtp.gmail.com with ESMTPSA id 1sm10773083qtb.40.2017.04.03.17.59.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Apr 2017 17:59:45 -0700 (PDT) In-Reply-To: <58DF78AB.9010603@gmx.at> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-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:131255 Archived-At: Hi Martin, Thanks for your comment. I was a bit slow to respond because I was bit intimidated to start looking at the c code! Sorry. It should be noted that I don't know that actually moving the mouse plays a role here. As long as the mouse cursor is over the other frame, the issue happens, even if I don't actually move it. Setting track-mouse doesn't make a difference. I think trying to figure out where the switch-frame actually gets triggered is a good idea. It looks like I'm going to have to try doing some serious spelunking (at least for me)! As I think you suggest, I want to try to figure out what is getting sent by xwindows vs what is being generated by emacs itself. On 04/01/2017 05:53 AM, martin rudalics wrote: > > 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. > > 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 = make_lispy_switch_frame (frame); > internal_last_event_frame = 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 ‘track-mouse’ to nil do you still see the > problem? Since this probably won't help when you are within the body of > a ‘track-mouse’ 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 ‘handle-switch-frame’ says > > A switch-frame event tells Emacs that the window manager has requested > that the user’s events be directed to the frame mentioned in the 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 >